Hot answers tagged

8 votes
Accepted

Reject emails that fail reverse hostname resolution

Just replace smtpd_client_restrictions = reject_unknown_reverse_client_hostname with smtpd_client_restrictions = reject_unknown_client_hostname . From the Postfix manual: ...
6 votes
Accepted

reject: RCPT from unknown[]: 450 4.7.1 Client host rejected: cannot find your reverse hostname

What is happening is that your submission service is inheriting the main.cf options. Those deviations from the postfix defaults may not be unreasonable for server to server mail exchange. But for ...
  • 8,120
5 votes
Accepted

Postfix - how to set a message ID?

This is controlled by the always_add_missing_headers setting. By default Postfix will only do that for clients for which it would rewrite (address) headers anyway. You can enable it unconditionally, ...
  • 8,120
5 votes

How to generate separate autoreply warning from postfix to senders not using DKIM?

Please do not do this. Despite it would be nice if everyone signed their email with DKIM, this is not a good path to achieve it. Most of the automatic responses would go to the users that are not ...
  • 44.8k
4 votes
Accepted

Procmail on Postfix - delivering Email to Inbox

You need a c flag on the first recipe (and no c flag on the second, unless you want a third copy of the message after this delivery). In very brief, the first successful delivering recipe terminates ...
  • 1,371
4 votes
Accepted

Spamhaus is blocking several customers since a couple of days?

Your configuration is dangerously wrong. You must filter the DNS return codes, as instructed. Not every response from spamhaus indicates a listing, some indicate lookup errors (usually: querying via a ...
  • 8,120
4 votes

Postfix send mail as other user

The smtpd_sender_restrictions has reject_sender_login_mismatch: reject_sender_login_mismatch As of Postfix 2.1, this is an alias for "reject_authenticated_sender_login_mismatch, ...
  • 44.8k
3 votes
Accepted

Mail server sending to postfix refusing TLS connection with "certificate expired", but it's not

I'm not perfectly sure, but I think I know what's going on now. The remote side seems to use an outdated version of OpenSSL, which chokes on letsencrypt's cross-signature of the (expired) DST Root CA ...
3 votes

Gmail rejects forwarded mail with DMARC but I AM using SRS

I forward my own domain's email to Gmail accounts, too, and OpenDKIM + OpenARC alone won't suffice for this setup. You will need DKIM + ARC + SRS ("Sender Rewriting Scheme") to make this ...
  • 31
3 votes

Alternative to Gmail Postfix relay

There is an option called "App passwords" in the security tab of the Google account dashboard. It is only available after you enable 2-step verification. This option provides a single use ...
3 votes

"postconf: warning: /etc/postfix/main.cf: undefined parameter: mail" when running the command "postconf default_process_limit" in Ubuntu 20.04 Server

Your last line is smtp_helo_name = $mail.example.com But you don't have any variable $mail defined. Use the actual DNS name of your mail host, not a variable.
3 votes
Accepted

How do I get postfix to log the Helo/ehlo responses?

The general method of doing this is to increase debug level for smtp transport. You can add your test peer address into debug_peer_list, and for that peer it will log way more information than usual, ...
3 votes
Accepted

Postfix: stop all outgoing emails

There would be many ways, including smtpd_relay_restrictions= defer_unauth_destination (without the permit_mynetworks, permit_sasl_authenticated from the default setting). But you have to keep in mind ...
  • 44.8k
3 votes

Postfix can not receive mails

Minor issue: mskillsa.com. 14400 IN MX 10 mainserver.mskillsa.com. mskillsa.com. 14400 IN MX 10 mail.mskillsa.com. Two MX records pointing to the same ...
  • 74.1k
3 votes

How to reject spam emails with from field as my own email address?

Entirely within Postfix's configuration If you have configured email submission as a separate SMTP instance, as you should, you could use header_checks. This requires the Postfix's PCRE support to be ...
  • 44.8k
3 votes
Accepted

Postfix - Discarding EHLO Keywords Duplicate Log Entries

Its harmless - actually, the norm, in all but rare special cases: Almost all clients will send EHLO once to coax the server into revealing that yes, of course, it will accept the STARTTLS workaround ...
  • 8,120
2 votes

Postfix: Allow SMTP AUTH only from specified IP address ranges

Pretty old question, but if you like me come here from Google - this can be done via smtpd_discard_ehlo_keyword_address_maps feature. You just add parameter smtpd_discard_ehlo_keyword_address_maps = ...
2 votes

Fail2Ban: already banned?

I found the possible problem. In the setting, the default is banaction = iptables-multiport In [sshd] section, port = ssh. I have added other ports to ssh. To block all connections, in [DEFAULT]...
2 votes

Postfix TLS Error

You can also solve this problem, producing a fullchain. After you have a correct fullchain, add the fullchain to: etc/postfix/main.cf smtpd_tls_cert_file = /etc/ssl/certs/some-cert-file-with-...
  • 21
2 votes

Is there any way to run Postfix in foreground?

Since Postfix 3.4 this is supported properly, elimitating a syslog dependency. Excerpt from postfix/MAILLOG_README: Configuring logging to stdout Logging to stdout is useful when Postfix runs in a ...
  • 3,464
2 votes
Accepted

Postfix bar authentication from internet

If the abused auth feature is not needed otherwise, you can configure Postfix to not expose that feature to the wider internet. This is usually done by editing your main.cf and master.cf files. First, ...
  • 8,120
2 votes
Accepted

Can postfix log source ports for inbound SMTP connections?

Yes, just set smtpd_client_port_logging to yes. smtpd_client_port_logging (default: no) Enable logging of the remote SMTP client port in addition to the hostname and IP address. The logging format is ...
  • 8,120
2 votes
Accepted

How to prevent unauthorized relay of mail in Postfix

As the other answer already correctly concluded, malicious party obtained the password of some account on your server. Probably, it was too weak. Or user of that account catched the malware who stole ...
2 votes
Accepted

The same message delivered multiple times on postfix

I have figured out what was the reason. It was that redis server (used by rspamd) was misconfigured. In rspamd logs there was an entry: cannot get ANNs list from redis: timeout while connecting the ...
  • 31
2 votes
Accepted

Why does my RSA DANE TLSA work, but my ECDSA DANE TLSA fail?

Yup, the tools you mentioned are not appropriate to test your setup. Use a test that checks step by step and return clear messages. A good test needs to individually test the Cartesian product of the ...
  • 8,120
2 votes

Use smarthost only if VPN is up (Debian, Postfix)

Your situation is similar to a dialup user. Copy /etc/postfix/main.cf to /etc/postfix/main.cf.nodefer. Copy /etc/postfix/main.cf to /etc/postfix/main.cf.defer and add defer_transports = smtp. In your ...
  • 17.9k
2 votes
Accepted

postfix loops back to myself email issue (was working before apt upgrade Ubuntu)

The mydestination has mail.raizen.top but not newyork.raizen.top. Therefore, Postfix thinks this is outside of the local systems and tries to deliver it using the newyork.raizen.top. MX 1 mail.raizen....
  • 44.8k
2 votes

gmail is rejecting my e-mails to a recipient with a gmail address with a 550-5.7.26

The SPF record for hartley-consultants.com must include the IP address of the host you’re sending email from. Google complains that the IP address you’re sending from is not authorised. (I don’t see ...
  • 857
2 votes
Accepted

gmail is rejecting my e-mails to a recipient with a gmail address with a 550-5.7.26

I think the answer to the problem probably lies in this: gmail-smtp-in.l.google.com[2a00:1450:400c:c1b::1a] said: which shows that you were talking to gmail over IPv6 but the hosts in your MX records ...
  • 1,290
2 votes

spamass-milter[1403]: Could not retrieve sendmail macro "i"!. Please add it to confMILTER_MACROS_ENVFROM for better spamassassin results

Your milter expects a property of Sendmail which is not true for Postfix. As documented in the macro section of the postfix milter readme, the milter macro i provides the queue identifier, which is ...
  • 8,120

Only top scored, non community-wiki answers of a minimum length are eligible