On Sun, Sep 01, 2013 at 07:30:35PM -0700, warpspasm wrote:
> Wietse Venema wrote
> > warpspasm:
> >> Wietse Venema wrote
> >> > warpspasm:
> >> >> I would like to use reject_unlisted_sender to allow only one 
> >> >> From: address
> >> > 
> >> > As documented reject_unlisted_sender is implemented in the 
> >> > SMTP server.
> >> > 
> >> >> Sep  1 08:00:52 xxx postfix/pickup[31603]: A696A34E481: uid=33
> >> > 
> >> > This mail is not received via the SMTP server.
> >> 
> >> So, does this mean that reject_unlisted_sender has no effect on 
> >> outgoing mail?

The concept of "outgoing mail" is a funny one to a MTA. All mail is 
incoming, originally. All mail goes out, one way or another.

Mail that comes in via SMTP is subject to various smtpd(8) settings, 
including the various restrictions which can be used.

Mail which does NOT come in via SMTP is not.

Your message did not come in via SMTP.

> > As stated here and in the documentation, reject_unlisted_sender 
> > has effect only on mail that arrives via SMTP.
> > 
> > When mail arrives via the postdrop directory, i.e. from some 
> > local process, then it is not returned to the process that 
> > submitted the mail. Instead, it is returned to theenvelope
> > sender address.
> 
> So, is there then no other way of accomplishing the same thing
> with another method?

No one said that. I will suggest herewith an hideous kludge which 
does what you are requesting. Read on.

> I must say, I was actually optimistically hopefully that there 
> would be a way to do it! Any ideas as to how I can solve this 
> problem would be most welcome.

I did not see where you really stated what the actual problem is. 
This looks to me rather like an "XY problem", which means you need 
"X" and you thought "Y" would achieve your goal so you ask how to 
accomplish "Y". People who are more familiar with the subject are 
puzzled why you'd want "Y".

Try describing the real problem and goal. Maybe you don't want nor 
need Postfix at all? Possibly a null client would make more sense. 
Only the one user account which configured the null client would be 
able to send mail outside (through a relayhost, that is.)

> I would like to be able to have a postfix server that only allows 
> outgoing emails from one From: address.
> 
> Any ideas? Thanks

Sure. As alluded above, that goal is strange. I suspect that a null 
client like msmtp would meet your actual needs better.

It's trivial to rewrite all outgoing mail (that which is being 
relayed by the smtp(8) client) to a single From: header and envelope 
sender address:

smtp_generic_maps = static:yoursen...@example.com
-- 
  http://rob0.nodns4.us/ -- system administration and consulting
  Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:

Reply via email to