|
From: Matthias A. <mat...@gm...> - 2025-11-11 18:41:31
|
Am 09.11.25 um 01:50 schrieb Hans Carlson via Fetchmail-users:
> I'm in the process of upgrading my ancient local-only little home mail
> server and was wondering how much it matters if I use smtp or sendmail
> for local delivery.
>
> My system is Fedora 43:
> fetchmail: 6.5.6
> postfix: 3.10.3
> alpine: 2.26
>
> Keep reading for details of my setup and why I'm asking.
>
> My setup is only used for 2 users, with a few email addresses for each
> user. The MTA is postfix, configured to listen only on loopback port
> 25 with a self signed cert. There is no access to this server from
> the outside. The only things that access the MTA are on the same
> host: alpine for relaying outbound mail and fetchmail for inbound mail.
>
> fetchmail is started/stopped daily for each user via cron and each
> user has the same basic fetchmailrc:
>
> set daemon 900
> set logfile log/fetchmail.log
> defaults
> timeout 120
> fetchall
> nokeep
> fetchlimit 50
> ssl
>
> poll ...
> poll ...
> poll ...
>
> I'm trying to configure smtpd_sender_restrictions in postfix, mainly
> so I'll get an immediate failure if I've added a new email address
> that hasn't been configured in postfix.
Those are only available through SMTP, not through most
/usr/{lib,sbin}/sendmail wrappers (certainly not Postfix's).
> The problem is, if I add smtp_sender_restrictions in the postfix
> config (main.cf), then those restrictions apply to all connections;
> both from alpine and fetchmail. I'm fairly certain there's a way to
> distinguish this by adding something to master.cf (still figuring that
> part out), but the key is, there needs to be a way to distinguish
> between the two. I think if fetchmail uses sendmail instead of smtp,
> I can use that to setup restrictions based on smtp connections
> (alpine/outbound) and restrictions based on sendmail connections
> (fetchmail/inbound).
You can add another smtpd listener (right hand side of master.cf) in
Postfix on a different port (left-hand side of master.cf, you can also
give numbers of ports instead of service names) and configure that with
its own option set. If you indent 2nd, 3rd, ... lines Postfix reads them
as continuation of the previous line in master.cf, and it should have
relevant examples.
HTH
Matthias
|