How To Change The Outgoing Email Domain In MacOS

Author: , March 17th, 2022

When I sent email from my desktop Mac cron jobs, it went out with the full hostname as the domain, i.e.:, when all I wanted was a simple for ease of deliverability and domain maint. Edit the mail configuration file

Add/edit the myorigin value of $mydomain:

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:

Edit the file /etc/postfix/ Add regexp:/etc/postfix/virtual-regexp to the virtual_alias_maps line. For example:

Generate the map .db file:

This example requires the files virtual and virtual.db to exist, even if they are […]

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/


/etc/postfix/sender_dependent_default_transport_maps aws-email: aws-email: Verify the credentials are in place and have the correct ownership and permissions:

Compile the new map and reload postfix.

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