Author:
erics , March 18th, 2022
vi / etc / postfix / master . cf
bounce unix - - n - 0 discard
defer unix - - n - 0 discard
Categories: How-To's , Technology Tags: Bounce , defer , Disable , Discard , Email , howto , master.cf , PostFix , tips
| No comments
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 , December 7th, 2021
I needed to block email based on the Subject header. The solution is simple: Edit main.cf as root and uncomment or add:
header_checks = regexp : / etc / postfix / header_checks
Next, creaate or edit /etc/postfix/header_checks as root and add the following line:
/ subject : \ sbad subject text here / REJECT header_checks NO SPAM ALLOWED
/ subject : \ stest subject text here / DISCARD header_checks NO SPAM ALLOWED
Finally, run sudo postfix reload NOTE: Do NOT add the “i” after the regular expression! It is case-insensitive by […]
Categories: How-To's , Technology Tags: Block , Check , Checks , Discard , Header , header_checks , headers , howto , PostFix , Reject , Spam , Subject , tips
| No comments
Author:
erics , August 12th, 2021
vi /etc/postfix/main.cf
#inet_protocols = all
inet_protocols = ipv4
service postfix restart
Categories: How-To's , Technology Tags: Email , Error , Gmail , howto , IPv4 , IPv6 , PostFix , Protocol , tips
| No comments
Author:
erics , September 14th, 2017
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
Categories: How-To's , Technology Tags: Delete , Email , howto , PostFix , postqueue , postsuper , Queue , tips
| 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 , September 13th, 2016
Step 1. Execute the following two commands: postconf -e smtpd_sender_restrictions=pcre:/etc/postfix/rejected_domains postconf -e reject_unauth_destinations=pcre:/etc/postfix/rejected_domains If that doesn’t work, you may hand-edit main.cf and add/edit these lines:
smtpd_sender_restrictions = pcre : / etc / postfix / rejected_domains
reject_unauth_destinations = pcre : / etc / postfix / rejected_domains
Step 2. Create the regex filter file: vim /etc/postfix/rejected_domains
/ \ . top $ / REJECT No spam allowed from the . top TLD
/ \ . stream $ / REJECT No spam allowed from the . stream TLD
Step 3. Signal Postfix to reread the config: postfix reload NOTE: Do NOT use the postmap command for the […]
Categories: How-To's , Technology Tags: Amazon Linux , AWS , Block , Filter , howto , Linux , PostFix , tips , TLD
| No comments
Author:
erics , June 17th, 2016
Jun 17 00:02:45 inbound dovecot: IMAP(yourName): Corrupted index cache file /home/yourName/Maildir/dovecot.index.cache: invalid record size
service dovecot stop
cd / home / yourName / Maildir /
rm dovecot . index*
service dovecot start
As always, YMMV. Proceed with caution.
Categories: How-To's , Technology Tags: AWS , Cache , Cache file , Corrupted , Corrupted index , Dovecot , Email , File , howto , IMAP , Index , Linux , mail , Mailhost , PostFix , tips
| No comments
Author:
erics , April 22nd, 2015
By default, Postfix restricts attachment size to about 10MB (10240000 bytes). You can check the current value by running the following command: postconf | grep message_size_limit To change the attachment size limit to say 50 MB, run a command like: postconf -e message_size_limit=52428800 You may find that the maximum mailbox size is lower than the […]
Categories: How-To's , Technology Tags: Attachment , Email , Email attachment , howto , Limit , mailbox_size_limit , Max , message_size_limit , postconf , PostFix , tips
| 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