Browsing articles tagged with "postfix - 59/66 - Admins Goodies"
Aug 11, 2011
tom

Stopping spam-related bounced emails

One of my e-mail customers is currently on the receiving end of massive amounts of delivery failure notices as a “Nigerian scammer” seems to be using her address as its MAIL FROM field. A lot of it is marked as spam by the SpamAssassin running on the inbound server (if they include the original message). I added a manual content filter which removes more of the stuff. I also temporarily blacklisted a few of the […]

Continue Reading »
Aug 11, 2011
tom

Postfix refusing to relay mail from local client

I’m trying to get a python script to send mail (using smtplib.SMTP), but postfix is refusing to relay the message. I don’t use the Ubuntu 10.10 Virtualmin server as a mail server (I happen to use google apps for that), but I want scripts to be able to send mail. Here is the log, with the addresses replsced with generic ones: Apr 11 00:50:27 unimatrix-01 postfix/smtpd[25212]: connect from localhost[127.0.0.1] Apr 11 00:50:27 unimatrix-01 postfix/smtpd[25212]: NOQUEUE: […]

Continue Reading »
Aug 11, 2011
tom

Why postfix doesn’t follow From header from PHP mail();

I have installed postfix with no config option. I am trying to send email with php mail(); it works but it sends email with the default email of my dedicated server. Are there anyway to tell postfix to follow the header set by mail function? Thanks Code $from=’no-reply@mywebsite.com'; $fromname=’my Website'; mail($mailto,$subject,$text,’From: ‘ . $fromname . ‘ <‘.$from.’>’); Try using the -f and -r additional parameters to override the from header and return path respectively. mail($mailto,$subject,$text,’From: […]

Continue Reading »
Aug 11, 2011
tom

Setting up Postfix for outgoing application email only

It turns out that I cannot use Nullmailer so that Logwatch and other services, like WordPress, can send email. So I have just now set up Postfix by issuing two first two commands here. I now wonder if there is anything else I need to do post-installation to make sure that Postfix is working properly and is secure. I’ve tested to send email through WordPress and it works. Note: Postfix will only be used to […]

Continue Reading »
Aug 10, 2011
tom

How to configure postfix to pipe all incoming email to a script?

Using postfix, I’d like all incoming mail, to any address (including those that don’t map to local users) to be piped to a script. I’ve tried configuring mailbox_command in /etc/postfix/main.cf: mailbox_command = /path/to/myscript.py This works great if the user is a local user, but it fails for “unknown” users who don’t have aliases. I tried setting luser_relay to a local user, but this pre-empts mailbox_command, and so the command doesn’t get run. I tried setting […]

Continue Reading »
Aug 10, 2011
tom

Postfix+Dovecot+saslauthd can’t recieve email from external domians

Hi On my Linode I followed this doc to setup a mail server. Now I can send email to any domain but can’t receive from other domains! I mean 001@mydomain.com can recieve from 002@mydomain.com but can’t recieve any mail from xxx@gmail/yahoo/…com. I checked my vmail (Maildir) too, mails from other domains aren’t there. I received Delivery Status Notification (Delay) from gmail(after about 24 hrs): Delivery to the following recipient has been delayed: myname@mydomain.com Message will […]

Continue Reading »
Aug 10, 2011
tom

Dovecot user lookup fails for email addresses

I have Dovecot v2.0.11 installed on a FreeBSD server and the user lookups for incoming email addresses are failing, but lookups for system users is successful. Dovecot is setup to use system users, so my dovecot.conf has userdb { driver = passwd } and passdb { driver = passwd } I have auth debug enabled. For example, I have a user called webmaster, and using doveadm user for “webmaster” works as follows: #doveadm user webmaster […]

Continue Reading »
Aug 10, 2011
tom

Configure postfix to catch all email for domain

I have a Java app that acts as mailing list and needs to process all incoming mail for subdomain.example.com. How do I set up postfix to catch all incoming mail? I’ve seen a few other posts for this question, but I also want to know should/can the catch all address be a real unix account or a virtual mail box? Martin Seems pretty straightforward, basically you just edit the virtual file so that all mail […]

Continue Reading »
Aug 10, 2011
tom

How to Run a script when a mail arrives in mail server? (Debian)

I want to parse and insert some information from the mail that just arrived in a mission critical application’s mail server. I there any way to configure my mail server so that it run a script when mail arrives. Although I have a debian system but any generic solution (Linux) will do. Looks like someone else has already answered this but thought I’d put down a specific answer for you. I would use procmail and […]

Continue Reading »
Aug 10, 2011
tom

Minimum PostFix configuration for sending emails only?

My servers are currently on sendmail which is not very efficient. I’d like to migrate to PostFix. I’m using Google Mail for Domain for handling incoming email so I need to setup PostFix to send emails only. What’s the minimal PostFix configuration I must do to set up outgoing email delivery and prohibit receiving email? All localhost emails are trustable by default. The postfix documentation tells you exactly what you need to do. Check more […]

Continue Reading »