My expertise with email servers & protocols is very limited. That being said, here is a problem I've been dealing with for a few hours now without finding a suitable solution:
I run a box in Amazon's EC2, and I use postfix. In order to avoid being marked as a SPAM source because of EC2's IPs being dynamically assigned, I use AuthSMTP as a relay for my outbound email. My setup pretty much matches what is described at http://is.gd/3Qfay . Actually this is not true for ALL outbound emails. I actually love Gmail as a MUA, so I have most of my own domain's email accounts mapped to gmail accounts. For example, all incoming emails for my account myacco...@mydomain.com are forwarded to myacco...@gmail.com . Thus, in order to save AuthSMTP quota, and since Gmail servers deal correctly with EC2 IPs (they don't take them for SPAM sources), I actually use the transport_maps directive as follows: [/etc/postfix/main.cf]: transport_maps = hash:/etc/postfix/transport [/etc/postfix/transport]: # Syntax: .domain transport:relay_host gmail.com smtp: * : If I got it right, this makes all emails bound for gmail.com accounts to be sent directly by postfix via SMTP, whereas all other emails will be sent through the AuthSMTP relay. OK, so now here is my problem: When my postfix receives a SPAM message bound for one of my accounts, this email is forwarded to gmail's SMTP server directly. But then gmail's SPAM filter rejects this message and here starts my problem. AFAIK what postfix should do is bounce the message to the SPAM source address. But according to my transport file, unless the SPAM source address is a gmail account, postfix will attempt to send the bounce through my AuthSMTP relay, and my AuthSMTP quota gets quickly exhausted with all these SPAM bounce messages. What I have done is I have included the following line in my main.cf file: soft_bounce = yes This prevents the bounces to be sent through AuthSMTP, but I can see them getting stacked in postfix's queue: r...@mydomain:/etc/postfix# mailq -Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient------- 233898A289 16603 Thu Oct 1 12:04:31 f...@real-leads.com (host gmail-smtp-in.l.google.com[209.85.212.99] said: 552-5.7.0 Our system detected an illegal attachment on your message. Please 552-5.7.0 visit http://mail.google.com/support/bin/answer.py?answer=6590 to 552 5.7.0 review our attachment guidelines. 39si713908vws.28 (in reply to end of DATA command)) myacco...@gmail.com A04908A222 68107 Thu Oct 1 11:42:23 silicon...@rouches-internet.com (host gmail-smtp-in.l.google.com[209.85.212.20] said: 552-5.7.0 Our system detected an illegal attachment on your message. Please 552-5.7.0 visit http://mail.google.com/support/bin/answer.py?answer=6590 to 552 5.7.0 review our attachment guidelines. 28si15619914vws.148 (in reply to end of DATA command)) myacco...@gmail.com I understand that this is not a real fix, and that after a time limit (default 5 days, I believe), postfix will eventually try to send those bounces through AuthSMTP anyway. Any ideas on how I should deal with these SPAM bounces in order to preserve my AuthSMTP quota? Is there any way I could force postfix to send bounces directly via SMTP instead of looking at my transport table? Many thanks, Jose