Reaching out to others! Free & Open Source Software, Kannada, L10n, L18n Data Science, Cloud Computing & more…

421 Message temporarily deferred – Yahoo

General, linux, QuickFix, Technical | 0 comments

All emails sent out to yahoo were deferring with the following error code today and I was bombarded with the tickets and chat early in the morning.

421 Message temporarily deferred – [numeric code]

If you are seeing the error “421 Message temporarily deferred – [numeric code]“, where “[numeric code]” shows a specific diagnostic code (e.g., “4.16.51″, “4.16.52″) in your SMTP logs, you will be directed to view the following page @ Yahoo.

https://help.yahoo.com/l/us/yahoo/mail/postmaster/postmaster-22.html

This doesn’t really help me to take care of the issue immediately as my customers are normally on shared hosting servers where in more than one domain will get affected as and when a big email service provider blocks our IP on their network for intentional / non-intentional spamming activities.

I have learned that such issues were used to be resolved by routing the emails to a different server to bring back the email service online or the MTA interface could have been changed to deal with the same.

Now, cpanel has made lots of changes to its MTA (exim) ACL’s to deal with this issue. Cpanel allows us to use different IP for each domain hosted on a shared hosting account if they buy a dedicated IP. These IP’s are listed in a file called /etc/mailips.  Following lines are taken from /etc/exim.conf
transport section. Here you could see that interfaces are searched against the domain name through which the email’s are being sent out of the server. If the domain name is not associated with a dedicated IP in /etc/mailips, MTA will use servers main IP to send out that email.

# This transport is used for delivering messages over SMTP connections.

begin transports

remote_smtp:
driver = smtp
interface = ${if exists {/etc/mailips}
{${lookup{$sender_address_domain}lsearch{/etc/mailips}{$value}{}}}{}}
helo_data = ${if exists {/etc/mailhelo}
{${lookup{$sender_address_domain}lsearch{/etc/mailhelo}{$value}
{$primary_hostname}}}{$primary_hostname}}

dk_remote_smtp:
driver = smtp
interface = ${if exists {/etc/mailips}
{${lookup{$sender_address_domain}lsearch{/etc/mailips}{$value}{}}}{}}
helo_data = ${if exists {/etc/mailhelo}
{${lookup{$sender_address_domain}lsearch{/etc/mailhelo}{$value}
{$primary_hostname}}}{$primary_hostname}}
dk_private_key = “/var/cpanel/domain_keys/private/${dk_domain}”
dk_canon = nofws
dk_selector = default

Today, I faced an issue where in a php script that was unable to send out emails to  yahoo accounts. PHP sends email as the user nobody (web server user), hence the emails needs to be sent out via server’s main IP.  Server’s main IP was found to be blocked by yahoo and I had to take care of this issue quickly as my customer was on chat. Customer had no dedicated IP allocated to his domain and I can’t help much even if he has got one as php is sending out email as nobody. I had to change the interface used for servers host name.

I went ahead and added a entry in /etc/mailips (I found it empty) and added the host name with the secondary IP which was found on the server as follows :

server.hostname.com :

To test whether this configuration works fine or not, I sent out an email to yahoo test account via console and it did a trick. Even php scripts started shooting out emails to yahoo accounts.

Related Articles

Related