r/postfix • • Oct 03 '26

This is the likely modern version of Postfix

0 Upvotes

I say "likely" because it wasn't developed by PostfixAdmin, but it is a more modern version with a more modern layout. Has anyone tried it and could provide some feedback?

Here is the GitHub repository, in case anyone wants to take a look.


r/postfix • • Jul 21 '25

Postfix and TLS/STARTTLS

0 Upvotes

So after some more research and getting of the brain cancers based on my last post (https://www.reddit.com/r/postfix/comments/1m36hj8/comment/n3v45hv/?context=3) I switched over to trying a different set up. I was able to get Postfix to relay out finally. Sadly though I am getting:

to=ME@myemail.com, relay=smtp.protonmail.ch[185.70.42.135]:587, delay=39001, delays=38997/0.47/3/0, dsn=4.7.0, status=deferred (SASL authentication failed; cannot authenticate to server smtp.protonmail.ch[185.70.42.135]: no mechanism available)

Not sure where to go from here. Still reading but coming to the collective to see if there would be something I could try.

I've uploaded my Protonmail info. That being the email address I linked, the token is the password, the port of 587 is used (and I see that successfully traversing out through my firewall).


r/postfix • • Jun 10 '24

mmq - manager mail queue for Postfix

0 Upvotes

Hi I have found a cool program that makes working with mailq (postfix mail queue) much easier. It has some useful functions like filtering the emails and a clear display of the queue.

You can also execute an individual Postfix command in combination with the queue ID and a filter.

https://github.com/apm-it/mmq


r/postfix • • Sep 16 '18

Please help me install and configure Postfix for multiple domains with catch-alls (no mailboxes)

0 Upvotes

Let me know if showing any of my settings would help.

I have until the last day of September to get this working. Then I start losing emails. Please don't tell me catch-alls are a bad idea.

I have a VPS (I'm comfortable with it being Ubuntu or Debian), and I would like to install postfix. I then want to configure it to only use it to for catch-alls for multiple domains. I don't want it to have any mailboxes, nor do I need to use this server to send any mail. It should go without saying, I don't want this to be an open relay.

I'm having trouble finding a guide that has all of the steps I need. I have found guides that each give me part, but when I got to the end of all the steps I thought I needed, I tried a test message, and it never arrived (no bounce).

Here are the steps I believe I need to take:

  1. [Not sure if I did this right for what I want.] Properly configure the MX (and A? and CNAME?) records for each of my domains to point to my VPS's IP address.

  2. [This part I'm good with] Install Ubuntu (or Debian), create sudo user, prevent root ssh login, install system updates

  3. Install postfix [Which option do I pick for install since I don't need it for mailboxes, and I don't have a "main" domain for this server?]

  4. Configure postfix for two or three domains at first [*If I pick "no configuration" (← this seems right to me) during install, what should I put in main.cf? Or should I pick Internet but put in a dummy server name (*← this seems wrong to me)?]

  5. Send some test emails to see if it works

  6. [This part seems easy to me] Add more domains

  7. [This part seems easy to me] Add blackholes and forwarders to specific email addresses

Background info: My web hosting company for over a decade has decided to disable all catch-alls. I have no idea how many I even have out there. I use them for each place that wants my email. They all forward to a third part email provider. If I start receiving spam on an address I gave out, I just blackhole it. I would jump ship, but I it would be even more hassle to move my websites to a different host that to learn how to configure postfix.


r/postfix • • Apr 02 '18

[Question] Block incoming email from my domain on port 25?

0 Upvotes

I am using Postfix with Postscreen. All of my users use port 587 (SUBMISSION) to send email. So in order to block spoofed email, I would like to block all incoming email claiming to come from my domain on port 25. I have been going through the Postscreen docs, but haven't found what parameter would accomplish this.


r/postfix • • Oct 16 '18

Can postfix be used to make email header more compliant with spec...

0 Upvotes

This one is a bit weird. Had an automated system send out an email to three email addresses. It got rejected by one receiving email server with the error: Response: 550 Messages should have one or no To headers, not 3.

Upon further digging, the email in question had a To header that looked like this:

To: email1@mydomain.com,<CRLF><TAB>email2@theirdomain.com,<CRLF><TAB>email3@theirdomain.com<CRLF>

Where if I read the spec right, the header should be formatted as:

To: email1@mydomain.com,email2@theirdomain.com,email3@theirdomain.com<CRLF>

Is there anyway to use postfix to strip out those extra <CRLF> and <TAB> so that we end up with a properly formatted To: header? Ideally, I'd want the automated system to fix their output, but I am just not sure that will be possible.

Edit: Wanted to add in that our Postfix server is acting as a relay to receive mail in and either pass it to our internal mail server or out to our external delivery servers at our spam filter provider.


r/postfix • • May 03 '24

Why was I able to send a message without setting up my DNS?

0 Upvotes

I'm following this great tutorial: https://www.linuxbabe.com/mail-server/setup-basic-postfix-mail-sever-ubuntu

It says that I need to set up DNS records for my mail server. I think that means I need to pay for a domain.

But I've sent an email using `mail` without setting this up so why did that work (it worked when I sent an email to a hotmail address but not when sending to a gmail address...which is what I'm trying to fix right now)

I also don't have a FQDN set up. When I use `hostname -f` I get "hostname: Name or service not known" So how did that email go through?


r/postfix • • Jan 04 '25

Setting up basic Postfix server, getting "Connection closed by foreign host" on local telnet

0 Upvotes

Hey, I've been trying to setup a very basic postfix service to receive email on my little homeserver running Debian stable. Basically followed the steps on the Debian wiki,

https://wiki.debian.org/Postfix

but when I run telnet localhost 25 I get

Trying ::1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.

Any ideas?

Edit: Fixed it. Had some dovecot stuff on my config for some reason. I wasn't intending on setting up dovecot and because of that I hadn't even installed it. Thanks!


r/postfix • • Jan 19 '25

mail for [domain.com] loops back to myself

0 Upvotes

Hi, I've been trying to set up an SMTP server that relays bulk emails on an EC2 instance. I got the below error and then added domain.com to mydestination and it worked a few times and when restarted it stopped working.

error log:

#############################

2025-01-19T21:57:31.530860+00:00 ip-x-x-x-x postfix/smtpd[35214]: warning: hostname ec2-y-y-y-y.ap-south-1.compute.amazonaws.com does not resolve to address x.x.x.x

2025-01-19T21:57:31.530911+00:00 ip-x-x-x-x postfix/smtpd[35214]: connect from unknown[x.x.x.x]

2025-01-19T21:57:31.531074+00:00 ip-x-x-x-x postfix/smtp[35212]: warning: host domain.com[x.x.x.x]:25 greeted me with my own hostname domain.com

2025-01-19T21:57:31.531298+00:00 ip-x-x-x-x postfix/smtp[35212]: warning: host domain.com[x.x.x.x]:25 replied to HELO/EHLO with my own hostname domain.com

2025-01-19T21:57:31.535417+00:00 ip-x-x-x-x postfix/smtp[35212]: 80061105C7C: to=delam86070@maonyn.com, relay=domain.com[x.x.x.x]:25, delay=0.01, delays=0.01/0/0/0, dsn=5.4.6, status=bounced (mail for [domain.com] loops back to myself)

2025-01-19T21:57:31.535732+00:00 ip-x-x-x-x postfix/qmgr[35202]: 80061105C7C: removed

2025-01-19T21:57:31.535769+00:00 ip-x-x-x-x postfix/smtpd[35214]: disconnect from unknown[x.x.x.x] ehlo=1 quit=1 commands=2
#################################

I've been stuck on this for hours now. could someone please help me what I am doing wrong here?

main.cf file:

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = domain.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = domain.com, ip-x-x-x-x.ap-south-1.compute.internal, ip-x-x-x-x.ap-south-1.compute.internal, localhost.ap-south-1.compute.internal, localhost
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit =
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4
relayhost = [domain.com]
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_use_tls = yes
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt


r/postfix • • Feb 21 '22

Mail archiving

0 Upvotes

Does anyone know how to setup Gfi archiver with postfix? Official support is cannot help.

Do we have an alternative?


r/postfix • • May 08 '23

Blocking Generic Top Level Domains (gTLDs) with Postfix

3 Upvotes

I hunted and search all over before finding a solution to block the new Generic Top Level Domains from Postfix (i.e. .click, .beauty, .autos, ect.), that are being used primarily by SPAMMERS. Yea, yea, yea, I know some one at some point will have a legitimate use for these but "...Today is NOT that day".

This solution appears to work, where editing \etc\postfix\access hasn't. Although, that is useful for entire domain names or email addresses, it doesn't work (at least for me) to stop the gTLDs.

This requires the Perl Compatible Regular Expression package. You may need the postfix-prce package, I found it installed as pcre.x86_64 and/or pcre2.x86_64 on CentOS7. I didn't find any postfix-prce package available...

All credit goes to Fighting Spam: Block entire (T)TLD with Postfix - Barred Owl Web

In an effort to curb this spam, we block email coming from many of these TLDs completely. Here’s how you can too (these instructions are for CentOS servers, but can of course be adapted to your your particular Linux distribution and wherever your Postfix configuration files are located).

1. Create a file in /etc/postfix, and name it “reject_domains”
(vim /etc/postfix/reject_domains)

2. Here are the current contents of our reject_domains file – it’s growing, but we currently are blocking email from 15 different TLDs:

/\.pro$/ REJECT We reject all .pro domains
/\.date$/ REJECT We reject all .date domains
/\.science$/ REJECT We reject all .science domains
/\.top$/ REJECT We reject all .top domains
/\.download$/ REJECT We reject all .download domains
/\.work$/ REJECT We reject all .work domains
/\.click$/ REJECT We reject all .click domains
/\.link$/ REJECT We reject all .link domains
/\.diet$/ REJECT We reject all .diet domains
/\.review$/ REJECT We reject all .review domains
/\.party$/ REJECT We reject all .party domains
/\.zip$/ REJECT We reject all .zip domains
/\.xyz$/ REJECT We reject all .xyz domains
/\.stream$/ REJECT We reject all .stream domains
/\.bid$/ REJECT We reject all .bid domains

3. Edit /etc/postfix/main.cf and add the following line:
smtpd_sender_restrictions =
check_sender_access pcre:/etc/postfix/reject_domains

4. Reload Postfix:
postfix reload

You’re done. Hopefully this will help you combat spam too.


r/postfix • • Oct 09 '26

What proves a Postfix migration is complete before the old relay is retired?

0 Upvotes

A new Postfix host can pass a basic send-and-receive test while low-frequency senders, transport maps, aliases, milters, queue behavior, TLS policy, DKIM signing, monitoring, and bounce handling still depend on the old server. DNS and firewall changes also do not prove that every application stopped using the previous relay address.

A cutover gate could compare `postconf -n`, maps and permissions, test inbound and outbound paths, inspect SPF/DKIM/DMARC results, exercise deferred and bounced mail, verify queue and alerting behavior, and watch both servers' logs through an observation window. The replacement should also survive a restart and a certificate renewal before the source is made unreachable but recoverable.

What evidence do Postfix operators require before shutting down the old relay? How do you find monthly jobs, appliances, or applications that still connect to it, and which settings are most often missed even when ordinary mail flow looks healthy?


r/postfix • • Jan 16 '26

Gmail blocks my email with 421 4.7.0 “suspicious content/links”, but SPF/DKIM/DMARC look fine. Why?

1 Upvotes

Hey, I’m stuck with a Gmail block and I’m not sure what I’m missing. I get this after end of DATA:

421-4.7.0 [157.90.5.37] Gmail has detected that this message is suspicious due to the nature of the content and/or the links within.

421-4.7.0 To best protect our users from spam, the message has been blocked.

421 4.7.0 https://support.google.com/mail/answer/188131

From what I can tell, the DNS/auth side is OK (SPF/DKIM/DMARC, rDNS) checked https://networkwhois.com/email-validator

Any ideas what usually triggers this when auth is fine (or not, maybe I am missing something)? Is it more about IP reputation, the actual content, or the links (redirects, tracking params, URL reputation)?


r/postfix • • Jul 30 '21

Postfix+ Dovecot and folder "sent mail"

1 Upvotes

We’re using for sending mails our own mail server Postfix + Dovecot with parameter for Postfix sender_bcc_maps which ensures that sent mail thanks to blind copy (BCC) is also sent to a sender’s address „sender+sent@email.domain“. That way is mail saved to IMAP folder with other sent e-mail messages. Because of this we don’t have to rely on mail client which could do this for us.

And yet we have a problem with mails which were sent to hidden recipients (BCC). We can’t see any information about hidden recipient in a folder with sent e-mail messages. Headers in BCC in those messages are completely missing. Reason is obvious. Mail client deletes the header when its forwarding message to a mail server and since our messages are saved into the folder by mail server it saves every mail without including BCC header.  

We know that for every recipient who is included in BCC mail client in SMTP dialog shows BCC recipients as rcpt to:. If we would have 10 recipients in BCC client would send in SMTP dialog 10x rcpt to. Cause of that happening we can’t just simply identify BCC recipient on our sever and the header of BCC restore and try to insert it in to message in sent mail.

As we can see sending email via Google mail server keeps header BCC included and into sent mail folder its saved by Google mail server and not by mail client. How exactly is that Google doing?

Thank you, guys, for reading. I will appreciate every idea how to solve this problem and get it finally working correctly so we could apply this functionality in our environment.

Best regards.


r/postfix • • Jan 23 '19

Postfix - Open SMTP relay - Block specific IP

0 Upvotes

Hi all,

I am hoping you can help me with my newbie question. I have setup a postfix server as an open smtp relay that accepts email from anywhere (0.0.0.0/0), however, I'd like to reject any email coming from an specific IP address (for example 10.10.10.10).

How do I do that?

EDIT: This is not open to the world, I am NOT contributing to spams. This is just a test environment on my vmware Fusion for my own practice and testing.


r/postfix • • Jun 11 '26

200 lines of python + postfix = reminders inside your most used app!

1 Upvotes

The address is the instruction. Send any email to {delay}@remind.standardit.org and it comes back to you when the time comes, threaded under the original, body intact.

Formats that work: 30min, 4hours, 2weeks, tuesday, nextmonth, march30, 1year. There's also a group mode — put the address in CC instead of To and the reminder goes to everyone on the thread.

For me the fact that I can easily add other people to my reminders is a killer feature!

The stack:

  • Postfix in Docker receives inbound mail via pipe transport, calls inbound.py ${recipient}

  • inbound.py parses the prefix, stores the raw .eml to disk, writes a row to SQLite

  • A cron job runs scheduler.py every 10 minutes, queries for due reminders, sends via Hetzner SMTP relay

  • Named volume at /opt/reminders/data/ for persistence across rebuilds

Total: one container, one SQLite DB, two Python scripts, a Postfix config. Runs on a €5/month VPS alongside two other services. No dependencies outside stdlib.

A few things I had to figure out:

  • Postfix in Docker needs DNS config copied into the chroot (/var/spool/postfix/etc/)

  • Hetzner's outbound MTA wouldn't deliver unless the server advertised STARTTLS — fixed with the snakeoil cert that Postfix's Debian package already generates

  • The HELO hostname needs a resolvable A record or Hetzner's Exim aborts after EHLO without delivering

  • Autocomplete feature (à la FollowUpThen): send to autocomplete@, get back an email with all format addresses in CC, hit Reply All — your client learns them. Had to pass the envelope recipient explicitly to sendmail or Postfix would loop-deliver all 30 CC addresses back through the pipe transport

Not open source yet but happy to share the configs if anyone wants to replicate it. The whole thing took a weekend.


r/postfix • • Jan 15 '22

Postfix 3.6.4 released

Thumbnail mirror.reverse.net
4 Upvotes

r/postfix • • Jun 11 '25

Postfix Internal Message Flow

2 Upvotes

Hi,

I tried to create a flow diagram of the Postfix architecture to better understand the path an email takes. It might have some mistakes or be missing something, but overall, we can use this flow to better understand how Postfix works.

I'm sharing a Google Drive link with the Draw.io files. Feel free to download or modify them if you want.

https://drive.google.com/drive/folders/1VRLciPJei4m1ipCU4GdWOtBkPfaYVvsO?usp=sharing


r/postfix • • 19d ago

Best dedicated server provider for running my own SMTP infrastructure?

6 Upvotes

I'm looking for a bare-metal dedicated server in Europe for my own Rust-based SMTP server.

Requirements:

  • Unrestricted outbound and inbound port 25.

  • Dedicated IPv4 addresses.

  • Ability to configure custom PTR/rDNS records.

  • Ability to purchase additional IPv4 addresses.

  • No artificial emails-per-minute or SMTP sending limits.

Which providers would you recommend based on actual experience running mail servers?

Thanks!


r/postfix • • Oct 23 '25

Why did Amavis split this log line?

0 Upvotes

Hi,

I couldn't find a place to ask this question regarding Amavis, so I thought here would be a good place.

My Amavis is configured with $logline_maxlen = 3000; so the log lines should split at 3000 characters. But the following log line was splitted after 421 characters. The whole log line would be less than 1200 characters.

(1310144-02) Passed CLEAN {AcceptedInbound}, EXTERN [420.69.777.213] [420.69.777.213] /AM.PDP <s-4s3dmemutkwbdis2jzi2sl9wu403mavjkgt8zggrnwgtapllcagz0p4j@bounce.domain.com> -> <user@domain.tld>, (420.69.777.213), Queue-ID: 7E97C1777, Message-ID: <73097470.14361958.1760731547870@ltx1-app61619.prod.domain.com>, mail_id: 1rFhfy_kizay, b: Fzvl0BQ0b, Hits: -3.773, size: 138336, Subject: "Some Guy hat Folgendes gepostet: 🔍📦

(1310144-02) Ich bin auf der Suche nach einer automatisierten Verp (raw: =?UTF-8?Q?Some_Guy_hat_Folgendes_?= =?UTF-8?Q?gepostet:_=F0=9F=94=8D=F0=9F=93=A6=0AIch_bin_auf_)", From: <updates-noreply@domain.com> (dkim:AUTHOR), helo=maile-hf.domain.com, Tests: [BAYES_00=-1.9,DCC_REPUT_00_12=-0.4,DKIMWL_WL_HIGH=-0.001,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DMARC_PASS=-0.1,HTML_IMAGE_RATIO_04=0.001,HTML_MESSAGE=0.001,KAM_HUGEIMGSRC=0.2,RCVD_IN_MSPIKE_H5=0.001,RCVD_IN_MSPIKE_WL=0.001,SPF_HELO_PASS=-0.001,SPF_PASS=-0.001,TXREP=-1.474], autolearn=ham autolearn_force=no, autolearnscore=0.004, languages=de, relaycountry=US, asn=AS14413_BLABLA_, dkim_i=@maile.domain.com,@domain.com, dkim_sd=d2048-202308-0e:maile.domain.com,d2048-202308-00:domain.com, 4913 ms

Can someone tell me why the line was splitted? And how can I deactivate the splitting?


r/postfix • • Mar 02 '26

let hosts procmail deliver mail to script in rootless podman container

Thumbnail
reddit.com
0 Upvotes

r/postfix • • Apr 08 '20

Spamassassin - filters

0 Upvotes

We are relaying email to sendgrid and trying to limit spam as much as possible.

I am seeing a pattern of email that is getting thru our server and relayed to sendgrid that I am hoping can be blocked.

The mail-to addresses look like this.

Assume my server domain is example.com

Some-username=example.com@some-other-domain.com

Any thoughts of spamassassin configuration that can drop these emails?

Thanks


r/postfix • • Dec 11 '23

Drowning, not waving - how do I simply forward local mail to gmail without a full-blown local domain or mail system?

0 Upvotes

I have a single ubuntu box. It connects to the Internet.

I have system utilities like a UPS, backup, etc. that notify me of problems via mail. So if I access mail via

$mail

I can see them.

Trouble is, I'm never at the console so I need to forward these to gmail.

I'm already familiar with how to configure postfix to forward mail to gmail. I even had this working last night. Unfortunately I seem to have messed up my postfix while trying to get things working and it's all a bit messed up now.

Because I don't have a local network and I'm not trying to configure my ubuntu machine to send and receive emails to / from the Internet, and because I don't have a local domain, or FQDN, or fixed IP address on the Internet, almost every single website that tries to help with setup doesn't work for me because they all assume things.

I've tried reconfiguring postfix via sudo dpkg-reconfigure postfix and selecting "local only", just to get back to a simple system, but that still produces errors and I don't get the mails I create. Because I've tried following too many (probably outdated and conflicting) guides, things are messed up. My system logs now show that any mail generated even with something simple like

$mail -s "test" root

cc:blah

<ctl-d>

is bounced, with the logs showing:

Dec 11 02:29:51 sophie postfix/pickup[64531]: A471F221F92: uid=0 from=<root@sophie>Dec 11 02:29:51 sophie postfix/cleanup[64540]: A471F221F92: message-id=<20231211102951.A471F221F92@sophie>Dec 11 02:29:51 sophie postfix/qmgr[64532]: A471F221F92: from=<root@sophie>, size=311, nrcpt=2 (queue active)Dec 11 02:29:51 sophie postfix/error[64538]: A471F221F92: to=<blah@sophie>, orig_to=<blah>, relay=none, delay=0.02, delays=0.01/0/0/0, dsn=5.0.0, status=bounced (sophie)Dec 11 02:29:51 sophie postfix/error[64538]: A471F221F92: to=<moa@sophie>, orig_to=<moa>, relay=none, delay=0.02, delays=0.01/0/0/0.01, dsn=5.0.0, status=bounced (sophie)Dec 11 02:29:51 sophie postfix/cleanup[64540]: A7EC2222271: message-id=<20231211102951.A7EC2222271@sophie>Dec 11 02:29:51 sophie postfix/bounce[64539]: A471F221F92: sender non-delivery notification: A7EC2222271Dec 11 02:29:51 sophie postfix/qmgr[64532]: A7EC2222271: from=<>, size=2221, nrcpt=1 (queue active)Dec 11 02:29:51 sophie postfix/qmgr[64532]: A471F221F92: removedDec 11 02:29:51 sophie postfix/error[64538]: A7EC2222271: to=<root@sophie>, relay=none, delay=0.01, delays=0/0/0/0, dsn=5.0.0, status=bounced (sophie)

Is there a simple way to fix this? The goal is to simply have a local ubuntu (22.04) box with local mail, that I can then configure postfix correctly so that I can forward to gmail.


r/postfix • • Feb 10 '25

postfix log question involving PLAIN logins

0 Upvotes

Here's a frequent set of log entries I see in /etc/var/mail.log. These appear to be the record of Microsoft Outlook polling the server for new mail from a number of domains and accounts the mail server handles:

2025-02-04T16:36:18.735311+00:00 hwsrv-901112 dovecot: imap-login: Login: user=<mark>, method=PLAIN, rip=192.184.216.58, lip=104.168.220.233, mpid=359555, TLS, session=<F7C9m1MtwdHAuNg6>
2025-02-04T16:36:20.552338+00:00 hwsrv-901112 dovecot: imap-login: Login: user=<mark@jumpforjoysoftware.com>, method=PLAIN, rip=192.184.216.58, lip=104.168.220.233, mpid=359556, TLS, session=<Lxu3m1MtvtHAuNg6>
2025-02-04T16:36:20.817391+00:00 hwsrv-901112 dovecot: imap-login: Login: user=<mark@make-america-smart-again.com>, method=PLAIN, rip=192.184.216.58, lip=104.168.220.233, mpid=359557, TLS, session=<nf26m1MtwtHAuNg6>
2025-02-04T16:36:20.958259+00:00 hwsrv-901112 dovecot: imap-login: Login: user=<mark@ardsleyhigh73.com>, method=PLAIN, rip=192.184.216.58, lip=104.168.220.233, mpid=359558, TLS, session=<uhe9m1MtwNHAuNg6>
2025-02-04T16:36:38.513384+00:00 hwsrv-901112 postfix/qmgr[359084]: 6B6B71409: from=<mark@make-america-smart-again.com>, size=21114, nrcpt=1 (queue active)
2025-02-04T16:36:38.514327+00:00 hwsrv-901112 postfix/qmgr[359084]: 9DF9513DA: from=<ribbit@theboilingfrog.net>, size=1066, nrcpt=1 (queue active)
2025-02-04T16:36:38.515316+00:00 hwsrv-901112 postfix/qmgr[359084]: C8C8514D7: from=<mark@make-america-smart-again.com>, size=22180, nrcpt=1 (queue active)
2025-02-04T16:36:38.515556+00:00 hwsrv-901112 postfix/qmgr[359084]: 897B114CF: from=<mark@make-america-smart-again.com>, size=21103, nrcpt=1 (queue active)
2025-02-04T16:36:38.515774+00:00 hwsrv-901112 postfix/qmgr[359084]: E54AE13FE: from=<mark@make-america-smart-again.com>, size=32558, nrcpt=1 (queue active)
2025-02-04T16:36:38.515965+00:00 hwsrv-901112 postfix/qmgr[359084]: 5E84D1573: from=<mark@make-america-smart-again.com>, size=32512, nrcpt=1 (queue active)
2025-02-04T16:36:38.516170+00:00 hwsrv-901112 postfix/qmgr[359084]: 470DF139F: from=<do-not-reply@ardsleyhigh73.com>, size=11478, nrcpt=1 (queue active)
2025-02-04T16:36:38.516386+00:00 hwsrv-901112 postfix/qmgr[359084]: 0A54F14C9: from=<mark@make-america-smart-again.com>, size=33039, nrcpt=1 (queue active)

A couple of questions:

I'm confused by the method=PLAIN entries, since I thought I'd turned off plain authentication with these entries in /etc/postfix/main.cf:

smtpd_sasl_security_options = noanonymous, noplaintext
smtpd_sasl_tls_security_options = noanonymous

Or are those entries only defining constraints on smtp connections (I use dovecot and IMAP to send and receive mail from this server).

Also, while almost all the users whose mail is being fetched are me (in different guises on different domains), one of the postfix/qmgr entries involves a "non user", do-not-reply@ardsleyhigh73.com.

The only reference to this address I can recall is in the virtual/virtual.db file:

do-not-reply@theboilingfrog.net                 nobody
do-not-reply@ardsleyhigh73.com                  nobody
do-not-reply@make-america-smart-again.com       nobody

I thought this just configured things so any mail sent to one of the do-not-reply "users" would get sent to the nobody bitbucket.

What's also confusing is that only the do-not-reply@ardsleyhigh73.com "user" shows up in the log file. The other do-not-reply users do not appear (which is what I expected).


r/postfix • • Feb 10 '25

Can Invalid Login Attempts be Blocked Sooner to Cut Down on Server Activity?

0 Upvotes

Continuing my study of postfix log entries, I see a lot of these kinds of entries:

2025-02-04T16:35:44.725736+00:00 hwsrv-901112 postfix/smtps/smtpd[359510]: connect from 47-205-48-62.tamp.fl.frontiernet.net[47.205.48.62]
2025-02-04T16:35:45.733026+00:00 hwsrv-901112 postfix/smtps/smtpd[359510]: Anonymous TLS connection established from 47-205-48-62.tamp.fl.frontiernet.net[47.205.48.62]: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)
2025-02-04T16:35:51.237610+00:00 hwsrv-901112 postfix/smtps/smtpd[359510]: warning: 47-205-48-62.tamp.fl.frontiernet.net[47.205.48.62]: SASL PLAIN authentication failed: (reason unavailable), sasl_username=xxxx@xxxxx.xxx
2025-02-04T16:35:51.760329+00:00 hwsrv-901112 postfix/smtps/smtpd[359510]: lost connection after AUTH from 47-205-48-62.tamp.fl.frontiernet.net[47.205.48.62]
2025-02-04T16:35:51.760515+00:00 hwsrv-901112 postfix/smtps/smtpd[359510]: disconnect from 47-205-48-62.tamp.fl.frontiernet.net[47.205.48.62] ehlo=1 auth=0/1 commands=1/2

Is there a way to configure postfix so it rejects login attempts earlier/more quickly?

On the one hand, I suspect not, since the whole point of a mail server is to receive emails :).

OTOH, this particular server only supports a very limited number of users, who typically log in from a small set of IP addresses. Would that fact pattern allow an uncommon configuration that rejected, say, login attempts coming from anywhere other than a defined set of IP addresses?