Author:
erics, 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.: root@demo.wyzaerd.com, when all I wanted was a simple root@wyzaerd.com for ease of deliverability and domain maint. Edit the mail configuration file main.cf:
Add/edit the myorigin value of $mydomain:
Categories: How-To's, Technology Tags: Change, Domain, Email, Hostname, MacOS, mail, main.cf, Masquerade, mydomain, myorigin, PostFix
|
No comments
Author:
erics, 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. […]
Categories: How-To's, Technology Tags: 10.10.5, Bounce, cli, Command line, Email, FQDN, howto, macosx, mail, main.cf, PostFix, Send, tips, Yosemite
|
No comments
Author:
erics, April 7th, 2015
Create the file /etc/postfix/virtual-regexp. For example, forward all emails with a leading eric and ending with @thewyz.net to a Gmail account:
|
/eric.*/@thewyz.net wyzaerd@gmail.com |
Edit the file /etc/postfix/main.cf. Add regexp:/etc/postfix/virtual-regexp to the virtual_alias_maps line. For example:
|
virtual_alias_maps = hash:/etc/postfix/virtual, regexp:/etc/postfix/virtual-regexp |
Generate the map .db file:
|
postmap /etc/postfix/virtual-regexp |
This example requires the files virtual and virtual.db to exist, even if they are […]
Categories: How-To's, Technology Tags: Email, Expression, Forward, howto, main.cf, PostFix, Regex, Regular, Regular Expression, Regular Expressions, tips, Virtual, virtual_alias_maps, virtual.db
|
2 comments
Author:
erics, November 6th, 2011
NOTE: This procedure requires Postfix version 2.7 or greater! Create or edit the following three files: /etc/postfix/main.cf
|
sender_dependent_default_transport_maps = hash:/etc/postfix/sender_dependent_default_transport_maps |
/etc/postfix/master.cf
|
aws-email unix - n n - - pipe flags=R user=mail argv=/opt/aws/bin/ses-send-email.pl -r -k /var/spool/mail/aws-credentials -e https://email.us-east-1.amazonaws.com -f ${sender} ${recipient} |
/etc/postfix/sender_dependent_default_transport_maps yourName@gmail.com aws-email: yourName@yourDomain.com aws-email: Verify the credentials are in place and have the correct ownership and permissions:
|
chown mail:mail /var/spool/mail/aws-credentials chmod 600 /var/spool/mail/aws-credentials |
Compile the new map and reload postfix.
|
postmap /etc/postfix/sender_dependent_default_transport_maps postfix reload tail -f /var/log/maillog |
http://www.postfix.org/postconf.5.html#sender_dependent_default_transport_maps http://docs.amazonwebservices.com/ses/latest/DeveloperGuide/index.html?IntegratingWithServer.Postfix.html http://www.kutukupret.com/2010/01/02/postfix-bind-sender-domain-to-dedicated-outgoing-ip-address/
Categories: How-To's, Technology Tags: Amazon, AWS, aws-email, CentOS, Email Routing, mail, Mail transport, maillog, main.cf, master.cf, MTA, PostFix, Postmap, Routing, Sender, Sender-based routing, Transport
|
No comments
Author:
erics, 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
Categories: How-To's, Technology Tags: Access, Email, main.cf, PostFix, Postmap, postmap access, Reject, Reject Email
|
No comments