Questions tagged as ['postfix']

I've noticed for messages that fail to deliver with postfix, the body of the message is removed. Here's an example (real emails replaced with temps):
--5F54EFCA0A.1653443634/MYDOMAIN.COM
Content-Description: Delivery report
Content-Type: message/delivery-status
Reporting-MTA: dns; MYDOMAIN.COM
X-Postfix-Queue-ID: 5F54EFCA0A
X-Postfix-Sender: rfc822; FROM@MYDOMAIN.COM
Arrival-Date: Wed, 25 May 2022 ...

I have setup a new mail server on Ubuntu 20.04 and using Postfixadmin so I can manage multiple mail domains.
The initial setup using unix users worked fine for sending and receiving email. However after installing Postfixadmin and using this tool to add users, I can no longer send emails. Receiving works fine.
I used this guide for setup: https://www.linuxbabe.com/mail-server/postfixadmin-create-virtual- ...

In order to separate the mail logs from the general system logs, I added this line to /etc/postfix/main.cf
maillog_file = /var/log/postfix.log
As expected, a file /var/log/postfix.log
is created, and there are no more postfix
entries in the var/log/syslog
. Unfortunately, it seems that this will also change the contents of the log entries. This is what I get in the postfix.log
(changed my original ...

All this is specific to domains with no incoming emails at all and with no available MX.
A domain may not have any MX record, that's RFC-compliant, but may have a A record that doesn't point to any email server. In this situation, postfix tries to deliver an email to this domain using the @IP from A record. As the server at @IP is not a SMTP server delivery always fails (after a long time and a l ...

I started an auto response recipe for certain user hours ago.
I got the auto reply sent and the original mail delivered into Inbox. I tested it several times.
I made some minor changes in formail and now auto reply is sent but the original mail is not delivered to Inbox.
I went back to the first recipe but the problem remains.
I also tried changing the sender address, checked spam marked mails and ...

The SMTP MTA Strict Transport Security RFC 8461, 2 clearly states that:
However, MTA-STS is designed not to interfere with DANE deployments when the two overlap; in particular, senders who implement MTA-STS validation MUST NOT allow MTA-STS Policy validation to override a failing DANE validation.
Currently it seems that with the following Postfix configuration the MTA-STA overrides DANE (RFC 6698) v ...

I've been looking some similar examples and slight changes to them to perform that but unsuccessfully.
This is the first recipe at $HOME/.procmailrc of the user "me".
Mail is received by user@domain.tld but the auto response is not sent.
Centos 7, Postfix
procmail log doesn't say anything about that.
:0
* ^FROMuser@domain.tld
* !^FROM_DAEMON
* !^FROM_MAILER
* !^X-Loop: me@me.tld
| (formail -rk \
...
I build websites within a private home-office network.
Locally hosted website are development versions of sites that I build for clients. I want the websites that I am building to be able to send emails. And I want to test email capability from the local development versions of the sites within my office network.
My dev server is running Ubuntu 22.04
I am configuring postfix as a send-only server. I'd ...

I have been using Gmail as a Postfix relay for years. Works perfectly. But it seems that on May 30th 2022 this will be disabled by Google. They will not allow us to use "less secure apps" that rely only on username/password authentication.
So I need a solution. I need either a way to continue using Gmail as a Postfix relay or I need an alternative to Gmail (free and that doesn't block my emails due ...

We are running a Mailman server and for testing purposes I would like to configure postfix on that server to accept all incoming mail but delete any outgoing mail. How can I do this?
Note: "Postfix stop outgoing delivery but accept all incoming" is similar to what I am asking but rather than holding the outgoing mail I would like it deleted.

My postfix server accepts emails for 11 domains. I have paypal@xxxxxx.com email accounts on 2 of those domains. I would like to only have Paypal be able to send me emails to these accounts. So if joe@ccccccc.com sends me an email, I would like postfix to properly send it to /dev/null without it telling joe@ccccccc.com that his email was properly disposed of.
I have this new error since 2 weeks on my server.
I haven't touched the code or anything.
I usually send mail trough PHPMailer, but I noticed Thunderbird won't work anymore also.
I'm on Ubuntu 18.04 LTS. I did apt get update/upgrade (+ Reboot) but it didn't change anything
Sending a mail trough the "mail" command works fine :
echo "test" | mail -s "sujet" mymail@yahoo.fr
Here is my postfix main.cf ...

My postfix install denies relaying. But I'd like to configure it to make an exception for one specific destination address or a specific domain?
For example, allow relaying of all messages from anyone destined for abc@example.com or @example.com, but continue to deny relaying for all other cases.
How would that exception be configured in postfix?
I am using postfix on a Debian server, primarily to send outgoing email for websites and notifications, and have run into an issue where outgoing email to a certain mailing list provider is rejected but email to "normal" individual email addresses goes through just fine.
I've been informed this is due to an empty MAIL FROM, since that typically indicates a bounce or a spammer, which mailing lists ...

All my users use outlook, so the From field reaches the postfix like this: From: "Name and Surname" address@something.com. I need a regular expression to change the address, I have this in the file header_checks:
/^(From: "(?:[^"]|"")*" <reservas1@domain.co.cu>)$/ REPLACE From: "Reservas" <reservas@domain.co.cu>
and in the file main.cf have:
...
header_checks = pcre:/etc/postfix/heade ...
It seems that our mail server is being used to send spam.
- The sender of the email is a spoofed real account on our server.
- There is no email in the sent history for that account.
I would like to know if there is any way to prevent this. Any advice is welcome.
Postfix log:
May 9 22:12:21 mx postfix/submission/smtpd[1885206]: warning: hostname 201-91-101-26.customer.tdatabrasil.net.br does not re ...

As a company, we have a website where we can create an account, and then we can send a theme newsletter.
Sometimes, they make errors when typing their email address like @hotmil.com instead of @hotmail.com ...
I would like, if it's possible, to automatically correct the domain name, like making a file (like virtual domain) where I add : hotmil.com hotmail.com ...
Is there any trick to do this?

My Postfix server is receiving spam from an ever changing set of domain names but with a consistent pattern in the log file starting with line warning: hostname X does not resolve to address Y
. No legit (ham) email has this pattern so I would like to block emails associated with this message.
Is there a way to block these emails entirely in the Postfix configuration, such as in the main.cf file?
...

We have some SMTP server in our company. We have transport maps in which we define what domains send to other smtp server. Now, we need sender dependent config for some users. The users are using same domain as in the transport maps table.
I tried sender_dependent_relayhost_maps but It is not working when transport maps enabled.
Idea, what I want:
All @companydomain.ltd forward to smtp in transport_map ...
Reading at http://www.postfix.org/postconf.5.html#smtpd_relay_restrictions, we see that, by default, network mail relay access to postfix is restricted to "local" or "authenticated" users:
smtpd_relay_restrictions (default: permit_mynetworks, permit_sasl_authenticated, defer_unauth_destination)
Access restrictions for mail relay control that the Postfix SMTP server applies in the context of the RCPT ...
I have created a mail server using dovecot and postfix(Ubuntu ec2-aws). I'm receiving emails from any domain. but I can only send emails to gmail. When i try to send email to other domains,
CA58541898 1067 Sat May 7 09:22:44 info@mydomain.online
(conversation with mail.senderdomain.com[162.xxx.xxx.xx] timed out while receiving the initial server greeting) mail.senderdomain.com
above message i ...

For development purposes I wanted an smtp server, that simply places all mails into a local mailbox. To achieve this, I tried to setup a minimal postfix system.
# master.cf
smtp inet n - n - - smtpd
cleanup unix n - n - 0 cleanup
qmgr unix n - n 300 1 qmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer ...

I have server POSTFIX + DOVECOT with LDAP (ActiveDirectory) authorization.
/etc/postfix/ldap_virtual_mailbox_maps.cf
query_filter = (&(objectClass=person)(mail=%s))
result_filter = %s
result_attribute = mail
/etc/postfix/ldap_virtual_alias_maps.cf
query_filter = (&(objectClass=person)(othermailbox=%s))
result_attribute = othermailbox
/etc/dovecot/dovecot-ldap.conf.ext
pass_filter = (& ...

At the moment, postfix logs inbound connections like this:
May 4 11:15:01 hostname postfix/smtpd[161025]: connect from unknown[192.0.2.1]
This isn't enough information for hosting providers to respond to abuse reports where they use CGNAT. They need the source port to identify the offending customer.
Is there any way to make postfix log the source port? Something like this would be ideal:
May 4 ...

I am using the iredmail mail system. When I create a maillists and add a user, when I send an email to that maillist and add the user in that maillist, that user gets two identical emails. Is there a way to delete an email?

In order to avoid spam sent from my server I'm trying to get Postfix to block all outgoing emails, except the ones sent from specific email address (like noreply@example.com), and allow all incoming emails to all addresses listed in a mysql db.
I managed to configure the imcoming part, but I'm struggling to block the outgoing emails.
How do I do that? Is there a way I can test if the server actually bloc ...

I followed this link to add my unsubscribe email header as below,
/^Content-Transfer-Encoding:/i PREPEND List-Unsubscribe: mailto:<sender-email-address>?subject=unsubscribe>"
so that the unsubscribe requests could directly go to the sender, instead to a specific email address, such as the case at this link, where the header uses mailto:
like List-Unsubscribe: <mailto:xxxx@yourdomain.com>
Since a few weeks, mails sent via my mailserver at the-grue.de fail dkim authentification. That's very strange, because I'm not at all aware of any changes on my part...
mxtoolbox checked the mail, with this result:
https://mxtoolbox.com/deliverability/e6fcc04f-2e51-4884-bce8-c09897e99ba9
My MTA is postfix with opendkim on debian buster.
I definitively didn't change keys.
That's (most of) the opend ...
I have setup Postfix on my Ubuntu server to receive and send emails, and then I have created three virtual email addresses via /etc/postfix/virtual
like this:
support@domain.com mailer
sales.support@domain.com mailer
mine@domain.com mailer
As you can, all this virtual accounts are linked to one user mailer
.
Now, I have also setup dovecot
so I can access my mail server from my PC directly.
The issue ...

I have a Postfix e-mail server which should allow internal users to send and receive mail via it.
The sending should happen only when a user succeeds in a VPN connection which provides him/her with non-routable IP address on my LAN. Sending from the internet should not be allowed.
At the moment I am faced with a situation where attackers try to authenticate from the internet in an attempt to gain acces ...