90
votes
Accepted
Forcing the from address when postfix relays over smtp
This is how to really do it in postfix.
This config changes sender addresses from both local originated, and relayed SMTP mail traffic:
/etc/postfix/main.cf:
sender_canonical_classes = envelope_sender,...
- 1,104
58
votes
Accepted
Sending malicious email as a test
Use the EICAR test virus. http://www.eicar.org/86-0-Intended-use.html
echo 'X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*' | mail
Edit: Be sure to read Michael Hampton's as ...
- 98.1k
56
votes
Is Postfix the same thing as Sendmail?
Postfix and sendmail are different implementations of Mail Transfer Agents which are using Simple Mail Transfer Protocol (SMTP) for email transport over the Internet.
Postfix first released in 1998 ...
- 6,253
43
votes
Accepted
What's the difference between postfix/smtp and postfix/smtpd
postfix/smtpd - This is typically the SMTP daemon process for handling incoming mail and routing to the appropriate internal location.
postfix/smtp - This is typically the SMTP daemon process for ...
- 1,035
36
votes
Accepted
Can't change OpenDKIM socket in Debian stretch in /etc/default/opendkim
I finally found the solution.
The /etc/init.d/opendkim doesn't seem to do anything. But instead the servicefile /lib/systemd/system/opendkim.service is used which had the wrong socket hardcoded.
But ...
- 671
30
votes
Sending malicious email as a test
To be sure, you should use the EICAR test virus, and attach it to the email, rather than simply putting it in the body.
echo -n 'X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*' &...
- 241k
27
votes
POSTFIX: Limiting the rate at which a particular user can send email
It strikes me that all other answers to this old question are link-only. So I am going to describe in few words how to implement my favorite solution for this job.
The link that @84104 has suggested, ...
- 594
27
votes
Accepted
Is an IPv6-only MTA possible yet?
Short answer: it will work, technically, but you will have lots of undeliverable mail.
Long answer: Take your SMTP logs. Sed out all the domain names you send mail to. Check if they have IPv6 DNS and ...
- 3,527
25
votes
Accepted
How to verify if my postfix uses really TLS to send outgoing mails?
When postfix sends email to other server then postfix will act as SMTP client. Therefore the you need to refer to related document about SMTP client and TLS.
To activate TLS encryption feature for ...
- 18.1k
23
votes
Accepted
Postfix aliases db: No such file or directory
This is because you have
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
The hash: means, that you must have a database file containing the hashes, as described in Postfix lookup ...
- 44.8k
23
votes
Is there any way to run Postfix in foreground?
Starting with Postfix version 3.3, you can also use postfix start-fg, which according to the documentation:
Like start, but keep the master(8) daemon running in the fore-ground
It makes things ...
- 331
23
votes
Postfix, multi domains and multi certs on one IP
If you are on Postfix >=3.4, consider the following steps below as adapted from this link:
Step 1: Comment out the top two lines and add the follow lines to /etc/postfix/main.cf:
# ...
- 341
22
votes
Postfix connection lost after AUTH
My log files were getting filled up, and it's a waste of cpu to even allow a connection from these jerks. I created a fail2ban rule.
Jul 11 02:35:08 mail postfix/smtpd[16299]: lost connection after ...
- 321
22
votes
Accepted
How to disable RC4 on postfix?
Add to your main.cf:
# TLS Server
smtpd_tls_exclude_ciphers = RC4, aNULL
# TLS Client
smtp_tls_exclude_ciphers = RC4, aNULL
- 5,133
22
votes
Is an IPv6-only MTA possible yet?
The answer depends on your success criteria. But most likely will be no.
If you are running a business where any undelivered mail means a measurable cost. Then the answer is no, IPv6-only is not ...
- 30.2k
21
votes
How do I change postfix configuration after installing it?
The comment by derchris above is the actual answer to the original question. I know it's been years since this was asked, but neither of the answers were actually specific to the original question.
...
- 311
21
votes
Accepted
How can I reject base64 encoded spam email?
Don't do this with Postfix body_check but write a Spamassassin rule for it, instead. Spamassain decodes the message body before applying its rules. Something like:
body LOCAL_QUANZHOUCOOWAY /...
- 44.8k
20
votes
Accepted
crontab sends month-old emails
These are undelivered old mails in email queue. You need to find out and delete them if you want to get rid of them.
You can use mailq to check and postsuper -d ALL to delete them all at once.
Some ...
- 8,941
20
votes
Accepted
Postfix - gmail encryption
You are missing the smtp_tls_security_level directive.
smtp_tls_security_level = may
This will set it to opportunistic TLS, using encrypted connections if the server supports it, but allowing ...
- 21.8k
19
votes
Postfix Temporary lookup failure
mynetworks needs strict network ranges
In my case, there was a wrong ip range in /etc/postfix/main.cf.
# Wrong; Temporary lookup failure
mynetworks = 172.16.0.0/8
# OK
mynetworks = 172.16.0.0/12
...
- 456
18
votes
Postfix: what exactly are alias domains?
Adding alias.com to virtual_alias_domains is the correct first step, but that just tells Postfix that you want to use that domain for aliases. It doesn't say what the aliases should be. For that, you ...
- 391
18
votes
Postfix → Dovecot LMTP: User does not exist: uid@domain
You need to set:
auth_username_format = %Ln
In conf.d/10-auth.conf
That removes the domain name, and the '@'.
- 181
18
votes
postfix: aliases will be ignored
In my case I want to use /etc/aliases (because some packages uses it so you have to verify changes and replicate to /etc/postfix/virtual
The problem why it doesn't work is in myorigin. If you set ...
- 741
18
votes
Accepted
"unsupported dictionary type: pcre" postfix header_checks
pcre support is distributed in a separate package in Ubuntu. You can have postfix installed without having postfix-pcre installed.
You can confirm that this is your problem by listing all available ...
- 8,120
17
votes
How to collect bounces in postfix
Actually, Instyle's answer is very difficult to implement if you want to support many different domains and it is wrong because:
a) With his example of transport_maps, all the emails sent to that ...
- 2,150
17
votes
POSTFIX main.cf permission denied
In my case, the other answers didn't helped me, because I already had the context for those files correctly.
Even if the file's correct context are applied, you'll also need to be sure the Apache user ...
- 343
17
votes
Accepted
Ubuntu + Postfix: Mail Log Missing
Apparently, this was a permission issue for some strange reason. I tried the answers from this post below that sorted the issue.
Ubuntu 14.04 System Logging
sudo chown syslog:adm /var/log
sudo chmod ...
- 367
17
votes
Postfix, how can I reject spam from unknown IP (no DNS)
You're looking for reject_unknown_client_hostname.
From the documentation:
reject_unknown_client_hostname (with Postfix < 2.3:
reject_unknown_client)
Reject the request when 1) the client ...
- 241k
16
votes
Accepted
Why do I have to manually copy /etc/services and /etc/resolv.conf into /var/spool/postfix/etc?
Some Postfix processes are running in a chroot environment by default. Therefore there usually is something to provide them with the necessary files on startup.
On my Debian 7 system, the file /etc/...
- 651
16
votes
Accepted
Postfix Failed to start : unable to set exclusive lock: Resource temporarily unavailable
Thanks to to the URL shared with @ryan-babchishin , it helped to arrive to the solution
##The Problem
So I was using systemctl to start,reload,stop postfix and it was adding other hidden users , I ...
- 301
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
postfix × 6369email × 1561
email-server × 1040
smtp × 936
dovecot × 934
linux × 599
ubuntu × 494
spam × 333
centos × 300
debian × 276
ssl × 190
sasl × 178
spamassassin × 167
dkim × 162
gmail × 160
sendmail × 152
domain-name-system × 147
email-bounces × 137
spf × 125
mysql × 118
amavis × 115
php × 106
opendkim × 94
imap × 90
centos7 × 81