How To Enable SASL Authenticated Email Relay In Postfix

Author: , December 17th, 2010

Below info copied from http://www.postfix.org/SASL_README.html#server_sasl_enable Make sure saslauthd is running first. Edit /etc/postfix/main.cf: smtpd_sasl_type = cyrus smtpd_sasl_auth_enable = yes broken_sasl_auth_clients = yes smtpd_sasl_security_options = noanonymous smtpd_sasl_authenticated_header = yes smtpd_recipient_restrictions = permit_sasl_authenticated {other options that were already there} # postfix reload To test (you supply the items in bold): % telnet server.example.com 25 … 220 server.example.com […]

How To Reject By Email Address In Postfix

Author: , December 17th, 2010

Edit /etc/postfix/access and add entries like: baduser@baddomain.com 550 No such user here Then run the following command: postmap /etc/postfix/access Edit /etc/postfix/main.cf: smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/access, {any other options already there…} Then run the following command: postfix reload

How To Flush The Mail Queue In Postfix

Author: , December 13th, 2010

Flush the mail queue: # postfix flush OR # postfix -f View the mail queue: # mailq Delete all mail from the queue: # postsuper -d ALL Delete all mails in the deferred queue: # postsuper -d ALL deferred

How To Configure PostFix To Listen On Multiple Ports

Author: , November 27th, 2010

Modify /etc/postfix/master.cf, and add one line per port. The example below shows the original smtp line along with a sample new line. 25 inet n – – – – smtpd 2525 inet n – – – – smtpd Make sure to open the port in your firewall… Another interesting solution I found was to use […]

How To Clean Out The Mail Queue On MacOSX

Author: , August 26th, 2010

[code]sudo postsuper -d ALL[/code]

How to Send Email in Perl the Easy Way

Author: , December 18th, 2009

[perl] use strict; use Email::Sender::Simple qw(sendmail); use Email::Simple; use Email::Simple::Creator; my $email = Email::Simple->create( header => [ To => ‘"Eric" <eric@example_human.com>’, From => ‘"Quota Monitor" <quotamon@example_web_server.com>’, Subject => "Automated Message from QuotaMon", ], body => "User foo is over quota\n", ); sendmail($email); [/perl]