Re: Local delivery - smtp or sendmail

Hans Carlson via Fetchmail-users <[email protected]> Tue, 11 Nov 2025 12:24:08 -0800 (PST)
Newsgroups gmane.mail.fetchmail.user
Message-ID <[email protected]>
On Tue, 11 Nov 2025, Matthias Andree via Fetchmail-users wrote:

> Am 09.11.25 um 01:50 schrieb Hans Carlson via Fetchmail-users:
>>
>>  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).

Right, the restrictions I was planning to configure would only apply to =

the smtp connections from alpine.  I don't think I want any restrictions =

on the connections from fetchmail.  fetchmail should process all the mail =

it gets and deliver it to the local user.

For the smtp connections from alpine on the other hand I want to add a =

simply table with a list of the email addresses that are allowed to send =

email.  If in the future I add a new email address, then I want the alpine =

SMTP connection to my local postfix SMTP server to give me an immediate =

rejection so I know I need to go configure authentication for the new =

email address.  Without that, the postfix SMTP client connection to the =

isp relay will eventually fail with an auth error, but I won't notice it =

for some time because that's all done in the background.

Sooo... if I don't actually want any restrictions on fetchmail, then is =

there any reason NOT to use sendmail for delivery instead of SMTP?

>>  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.=A0 I'm fairly certain there's a way to distinguish
>>  this by adding something to master.cf (still figuring that part out), b=
ut
>>  the key is, there needs to be a way to distinguish between the two.=A0 I
>>  think if fetchmail uses sendmail instead of smtp, I can use that to set=
up
>>  restrictions based on smtp connections (alpine/outbound) and restrictio=
ns
>>  based on sendmail connections (fetchmail/inbound).
>
> You can add another smtpd listener (right hand side of master.cf) in Post=
fix =

> on a different port (left-hand side of master.cf, you can also give numbe=
rs =

> 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.

Yes, that is the other option I was looking at.  But using sendmail =

instead of a separate smtpd listener seemed like the simpler option as =

long as I don't need/want any local processing of inbound email by smtpd. =

Maybe in the future I'll think of something, but for right now I don't =

think smtpd would be adding anything to the process... basically, I just =

want fetchmail to get the mail and get it to the users INBOX.

And if I do want to process the incoming mail in some way in the future, I =

was planning to investigate some combination of postfix, dovecot and =

sieve.  At this point I don't really know anything about that, other than =

it seems to be possible.