How To Disable Email Bounce Messages In Postfix
1 2 3 |
vi /etc/postfix/master.cf bounce unix - - n - 0 discard defer unix - - n - 0 discard |
1 2 3 |
vi /etc/postfix/master.cf bounce unix - - n - 0 discard defer unix - - n - 0 discard |
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:
1 |
vi /etc/postfix/main.cf |
Add/edit the myorigin value of $mydomain:
1 |
myorigin = $mydomain |
I needed a way to get the dock icon to bounce for all incoming emails and there did not seem to be any option to do so. There is actually a simple way to do it, but it is not intuitive. The key is to add a new Rule! Open Mail.app and choose Mail -> […]
vi /etc/postfix/main.cf
1 2 |
#inet_protocols = all inet_protocols = ipv4 |
service postfix restart
PROBLEM: Email delivery to Google was failing with a “Service Unavailable” error:
1 |
relay=aspmx.l.google.com. [IPv6:2607:f8b0:400d:c0c::1a], dsn=5.0.0, stat=Service unavailable |
Note that the network address for the destination is shown as IPv6! That is the root cause of the issue: 1. Sendmail is sending mail from the IPv6 address instead of the IPv4 address 2. Google rejects IPv6 senders without proper reverse […]
To update your git user name and email address for all repos:
1 2 |
git config --global user.name "Your Name" git config --global user.email "yourName@theDomain.com" |
To update your git user name and email address for a specific repo:
1 2 3 |
cd repo git config user.name "Your Name" git config user.email "yourName@theDomain.com" |
1 2 3 4 |
add_filter( 'user_meta_admin_email_recipient', 'changeAdminEmails' ); function changeAdminEmails( $emails ) { return array( 'youremailtarget1@yourdomain.com', 'youremailtarget2@yourdomain.com' ); } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
#!/bin/sh DATE=`date` ( echo "From: Your Full Name <you@yourdomain.com>" echo "To: you@yourdomain.com" echo "Subject: AWS Instances Report for All Customers as of $DATE" cat <<EOT MIME-Version: 1.0 Content-Type: text/html Content-Disposition: inline <html> <body> <pre style="font: monospace"> EOT for profile in customer1 customer2 customer3; do for region in `aws ec2 describe-regions --output text | cut -f3`; do echo -e "\nListing Instances for profile $profile in region: '$region'..." aws ec2 describe-instances \ --filters "Name=instance-state-name,Values=running" \ --query 'Reservations[*].Instances[*].[InstanceId, PublicIpAddress, LaunchTime, InstanceType, Tags[?Key==`Name`] | [0].Value]| sort_by(@, &@[0][2])' \ --region $region \ --profile $profile \ --output table done done cat <<EOT </pre> </body> </html> EOT ) | /usr/sbin/sendmail -t |
root@outbound:/var/log # postqueue -p -Queue ID- –Size– —-Arrival Time—- -Sender/Recipient——- 593E2FC69D 3970 Tue Sep 12 23:15:36 MAILER-DAEMON (connect to yourDomain.com[10.10.10.10]:25: Connection timed out) yourUser@yourDomain.com — 4 Kbytes in 1 Request. root@outbound:/var/log # postsuper -d 593E2FC69D postsuper: 593E2FC69D: removed postsuper: Deleted: 1 message root@outbound:/var/log # postqueue -p Mail queue is empty
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. […]