How To Send Email From the Command Line on MacOSX 10.10.5 Yosemite

Author: , January 29th, 2017

I wanted to send email from cron for various reasons, but the emails would bounce with an error 554: 554 5.1.8 : Sender address rejected: Domain not found Clearly, Postfix was using the “internal” hostname of myappledesktop.local (MacOSX has TWO hostnames! also, myappledesktop.local is not the real hostname ;-). So, I needed two things: 1. […]

How To Use Regular Expressions (regex) To Forward Email In Postfix

Author: , April 7th, 2015

Create the file /etc/postfix/virtual-regexp. For example, forward all emails with a leading eric and ending with to a Gmail account: 1 /eric.*/ /eric.*/ Edit the file /etc/postfix/ Add regexp:/etc/postfix/virtual-regexp to the virtual_alias_maps line. For example: 1 virtual_alias_maps = hash:/etc/postfix/virtual, regexp:/etc/postfix/virtual-regexp virtual_alias_maps = hash:/etc/postfix/virtual, regexp:/etc/postfix/virtual-regexp Generate the map .db file: 1 […]

How To Use Sender-Based Routing In Postfix With AWS SES

Author: , November 6th, 2011

NOTE: This procedure requires Postfix version 2.7 or greater! Create or edit the following three files: /etc/postfix/ 1 sender_dependent_default_transport_maps = hash:/etc/postfix/sender_dependent_default_transport_maps sender_dependent_default_transport_maps = hash:/etc/postfix/sender_dependent_default_transport_maps /etc/postfix/ 1 2 aws-email unix  -       n       n       –       –       pipe  flags=R user=mail argv=/opt/aws/bin/ -r -k […]

How To Reject By Email Address In Postfix

Author: , December 17th, 2010

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