23 Comments

  1. Casey

    Thanks for posting this – it was helpful.

    In case it helps someone else:

    I also had a problem with my queue – it was loaded with deferred messages and Postfix kept hitting Yahoo with a large batch on every run through the deferred queue, and the messages were then being rejected by Yahoo and going back into the queue.

    I emptied the queue by holding all of the Yahoo destined mail and writing a script that released and immediately delivered (with postsuper -H and postqueue -i) 1 message every 10 seconds.

    Reply

  2. Helo Guys,
    I tried to implement the solution here but it just wont work.

    It seems that Postfix does not create the directory /var/spool/mail/private/yahoo, check out the log files:

    Dec 15 11:38:04 mxcluster postfix/qmgr[12435]: warning: connect to transport private/yahoo: No such file or directory
    Dec 15 11:38:04 mxcluster postfix/qmgr[12435]: warning: connect to transport private/retry: No such file or directory
    Dec 15 11:38:04 mxcluster postfix/qmgr[12435]: 0FB2720F7B6: to=, relay=none, delay=0.05, delays=0.05/0.01/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)

    So I checked the queue folder and in fact, there was no yahoo directory in the private queue folder.

    I checked the “postfix-files” file and could not understand how to configure postfix to create the folder.

    Can anybody help please?

    Thanks in advance.

    Cheers.
    RAfael

    Reply

    1. Its working!

      The problem was because I added the lines at the beginnig of the file.
      When I moved it to the end of the file, it just worked.

      A small detail that makes a huge difference.

      Thanks guys.

      Cheers.

      Reply

        1. Hi Steve.
          I’m still having a hard time to deliver to other providers.
          Messages go to deferred queue and when postfix try to deliver, it sometimes fails and all goes back to deferred queue.

          Is there anyway I can adjust postfix to stop trying delivering for some time in case of 4XX error messages?

          When this happens, postfix keeps trying to deliver when a temporary block is active. My biggest problem here is because postfix wont wait enough time to resend the messages, keeping the block active sometimes.

          Reply
  3. chris

    Thanks for this post. It has helped us tremendously after trying to deal with Yahoo with little success.

    The only problem we’re having still is that our regional former baby bell (SBC) is part of the Yahoo congolmerate, so a large percentage of consumers in our area use Yahoo whether they know it or not. Any of those consumers who have their own domains through yahoo end up using yahoo mail servers, but the domain in their address isn’t yahoo so they bypass the yahoo transport maps I have set up. So I still have to constantly monitor email because these bypassed yahoo mails end up getting through periodically and Postfix delivers them faster than my yahoo transport throttling.

    Far as I can tell, despite Yahoo’s best practices docs and misleading deferral messages, the only thing they seem to care about is delivery frequency. Send email to them too fast, and you get deferred. Drilbble it through and it doesn’t really matter what you send. At least that’s been my experience.

    Unfortunately, at the level of throttling we have to do to get all our messages out, we aren’t going to be able to deliver all our Yahoo mail on the same day in the near future. About the only solution I can come up with is to throw more servers at the problem. Waste of resources, but other than encouraging anyone and everyone not to use yahoo for email, I don’t have much of a choice.

    Reply

    1. Hi, Chris. Thanks for your comment. And you’re (unfortunately) 100% correct: the best solution we’ve come up with for Yahoo is to dribble them in, and throw more servers at it. What a waste. About half of our 500K person newsletter list has a Yahoo domain, and even with the fixes in this post, those addresses still clog our Postfix deferred queue for 2-3 days after the send. I’m currently setting up a dedicated machine to run multiple VMs. Hopefully quadrupling the number of outbound servers we use will cut our delivery to 25% of what they currently are. Same-day delivery would be nice. :)

      Reply

      1. Try to use a set of postfix instances each one using a dedicated outbound ip address to improve deliverability to yahoo, hotmail etc. Yahoo still checking domainkey as checking DKIM and SPF. Try use this three things. Maybe it work… maybe not… it’s hard days of deliverability we are living…

        Reply
        1. Dave

          You can also use

          -o smtp_bind_address=A.B.C.D

          on the transport in master.cf to set the outbound IP.

          That alone won’t help much, but couple it with a script like this that is configured as a transport map (http://www.kutukupret.com/2010/12/06/postfix-randomizing-outgoing-ip-using-tcp_table-and-perl/) and it’s a pretty elegant solution to randomizing the outbound IP without having the overhead of multiple postfix instances. (disclaimer: I did not write this script, only relied on it for setting up random outbound IP mapping)

          This allows you to spread out the delivery across any number of available IPs that you have. Of course, you’ll want to make sure that SPF, DKIM, and reverse DNS are configured for each IP, but you’d have to do that with separate instances as well.

          Reply
  4. chris

    I don’t know if this would help anybody else, but one of the things I’ve done is created a duplicate transport file. I call it transport.stopyahoo.

    It has lines that push yahoo mail directly to the deferred queue;

    yahoo.com defer:
    sbcglobal.net defer:
    ymail.com defer:
    etc…

    I also have a similar file that contains my “valid” yahoo transports (transport.startyahoo).

    Then, I’ve set up a couple of simple shell scripts that copy the file, remap it, and restart postfix;

    cp transport.stopyahoo transport
    postmap ./transport
    postfix reload

    So, when I start seeing deferrals, I run the script and it effectively stops yahoo delivery to all known yahoo domains in my transport file. I generally wait 15 to 30 minutes and then run the script that reverses it back out and starts up delivery again (that one includes a postqueue -f command to get the messages back out of the deferred queue).

    It’s not the most elegant solution, but I’ve found that if I don’t intervene when Yahoo starts deferring, the problem gets progressively worse. First I’ll get 421 messages (deferred). If I don’t stop the server from attempting to deliver, I’ll get 451 (iirc) messages (server refused to talk to me). Once I get those messages, I sometimes have to wait as long as 4 hours to get Yahoo to accept delivery.

    Reply

    1. Wondering if you could write a script that runs every 60 seconds and greps the maillog for Yahoo 4XX messages, and then launches the “defer Yahoo” script for you, wait X minutes, grep the most recent Y lines of the maillog for Yahoo deferrals, if none found (in the limited range), run the reverse script and flush the queue. Like you, I find managing Yahoo after the send to be a very hands-on experience. I’m trying to figure out how to set it, and forget it. :)

      Reply
      1. chris

        That would definitely be ideal and something I’ve given some thought to. It’s a bit beyond my linux/scripting expertise.

        You could use tail -f on maillog and redirect that to a temp file. Probably use grep to filter just yahoo and just deferral messages.

        Then you could periodically cat that temp file and pipe it into wc -l to get a line count, which would be a deferral count if your grep’s were set up right. Right after that, you could cat /dev/null to your temp file to clear it out so that file would be empty and let the file fill up again from the tail command.

        How to deal with that wc -l result is a little beyond my expertise without a little researching, and I suspect there’s probably a better approach than the above.

        You’d also need a way to turn delivery back on. About the only way to do that would be some sort of timed process – if deferrals reach a threshold, stop yahoo delivery, wait 30 minutes then start yahoo delivery and start the deferral log scan again.

        Reply
      2. Dave

        swatch is built specifically for tailing logs and taking action based on matched patterns. It’s fairly easy to install and configure and might save some time over a home-grown method.

        Reply
  5. ragiel

    Hi Steve,
    Im ragiel from indonesia,

    thx for the post,

    i want to ask something, i have a newsletter email with postfix. and it sent to all my client every days, its contain more than 20000 emails a days. mostly to yahoo and gmail. the question is could you give me suggestion for /etc/postfix/main.cf configuration.

    thx,

    Reply

  6. Great! Worked perfectly in our Postfix/CentOS e-mail
    marketing server, thank you very much for the good work.

    Reply
  7. Youngmoon Goh

    That’s a really good solution to me.
    Thank you very much.

    Reply

  8. John

    That’s funny. I sent ONE message to Yahoo, and subsequent e-mails are being deferred. Remind me again why anyone even still uses Yahoo? Why is the company even still around?

    Reply

    1. Hey, John. I know. They still are the most “stingy” of the freemail providers when it comes to inbound mail. :(

      Reply

  9. HI,

    After applying this, all mail are going fine in postfix but yahoo id are in mail queue with remarks “mail transport unavailable”. Pls suggest.

    Reply

Leave a Reply