limit alias lookup to configured domains

2011-11-25 Thread Lars Täuber
Hi list,

is it somehow possible to limit the lookup for aliases in
virtual_alias_maps to domains the postfix system is responsible for?

The problem:
I want »abuse@...« to be aliased to »postmaster« for every domain the system
is configured for. (virtual_mailbox_domains)

Therefore I've done this:
 virtual_alias_maps = regexp:/etc/postfix/virtual_aliases

 /etc/postfix/virtual_aliased:
  /^abuse@.*/   postmaster

but this aliases also mails that are sent from the local system to
ab...@foreign.domain.org.

How can I avoid to add an alias for every new domain I configure?

It would be nice to only add the domain to virtual_mailbox_domain and the
»ab...@new-domain.org« being automatically accepted and aliased to postmaster.
I'm sure to forget to add this alias the next time I add a domain.

Thanks
Lars


Re: limit alias lookup to configured domains

2011-11-25 Thread Ralf Hildebrandt
* Lars Täuber taeu...@bbaw.de:
 Hi list,
 
 is it somehow possible to limit the lookup for aliases in
 virtual_alias_maps to domains the postfix system is responsible for?
 
 The problem:
 I want »abuse@...« to be aliased to »postmaster« for every domain the system
 is configured for. (virtual_mailbox_domains)
 
 Therefore I've done this:
  virtual_alias_maps = regexp:/etc/postfix/virtual_aliases
 
  /etc/postfix/virtual_aliased:
   /^abuse@.*/ postmaster

Equivalent to:

^abuse@/postmaster
or
abuse@  postmaster
without pcre

 but this aliases also mails that are sent from the local system to
 ab...@foreign.domain.org.

Yes.

 How can I avoid to add an alias for every new domain I configure?

You can't. 

 It would be nice to only add the domain to virtual_mailbox_domain and the
 »ab...@new-domain.org« being automatically accepted and aliased to postmaster.
 I'm sure to forget to add this alias the next time I add a domain.

Maybe a script could help?

-- 
Ralf Hildebrandt
  Geschäftsbereich IT | Abteilung Netzwerk
  Charité - Universitätsmedizin Berlin
  Campus Benjamin Franklin
  Hindenburgdamm 30 | D-12203 Berlin
  Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
  ralf.hildebra...@charite.de | http://www.charite.de



Re: limit alias lookup to configured domains

2011-11-25 Thread Reindl Harald


Am 25.11.2011 09:41, schrieb Lars Täuber:
 Hi list,
 
 is it somehow possible to limit the lookup for aliases in
 virtual_alias_maps to domains the postfix system is responsible for?
 
 The problem:
 I want »abuse@...« to be aliased to »postmaster« for every domain the system
 is configured for. (virtual_mailbox_domains)
 
 Therefore I've done this:
  virtual_alias_maps = regexp:/etc/postfix/virtual_aliases
 
  /etc/postfix/virtual_aliased:
   /^abuse@.*/ postmaster
 
 but this aliases also mails that are sent from the local system to
 ab...@foreign.domain.org.
 
 How can I avoid to add an alias for every new domain I configure?

only if you are using mysql-configuration and scripts
using a special table where you add the abuse@ aliases
and if a new domain is created it adds the needed aliases
and removes them while deleting a domain



signature.asc
Description: OpenPGP digital signature


postfix receive only on port 25

2011-11-25 Thread Frank Bonnet

Hello

Anyone could send me a documentation link to configure postfix
to receive only on port 25 ?

The send process will use the submission port with auth and TLS
on the same server

Thanks



Re: postfix receive only on port 25

2011-11-25 Thread Reindl Harald


Am 25.11.2011 10:32, schrieb Frank Bonnet:
 Hello
 
 Anyone could send me a documentation link to configure postfix
 to receive only on port 25 ?
 
 The send process will use the submission port with auth and TLS
 on the same server

this is the default as long you have not uncommented the
submission line in master.cf and have to be disabled
also in the master.cf again, if you comment all smtpd
you even have no single port open and postfix would be
only accessable via sendmail-binary



signature.asc
Description: OpenPGP digital signature


Test postfix on another server

2011-11-25 Thread Tolga

Hi,

Is there some solution to test postfix on another server without 
changing MX? I'm in the phase of switching servers.


Regards,


Re: Test postfix on another server

2011-11-25 Thread lst_hoe02

Zitat von Tolga to...@ozses.net:


Hi,

Is there some solution to test postfix on another server without  
changing MX? I'm in the phase of switching servers.


Regards,



Simply use the MUA of your choice and point it to the new MX port 25.  
You machine should not be included in mynetworks of course.


Regards

Andreas




smime.p7s
Description: S/MIME Cryptographic Signature


Re: postfix receive only on port 25

2011-11-25 Thread Kirill Bychkov
May be http://www.postfix.org/master.5.html?

On 25 November 2011 13:32, Frank Bonnet f.bon...@esiee.fr wrote:

 Hello

 Anyone could send me a documentation link to configure postfix
 to receive only on port 25 ?

 The send process will use the submission port with auth and TLS
 on the same server

 Thanks




Cannot force Postfix to require password

2011-11-25 Thread Bernard T. Higonnet

Hello,

I would like to force all users sending mail to provide a name and password.

As of this moment, if, in the mail client (Thunderbird anyway), I
specify that the smtp server requires name and password it works fine
(that is: name is requested and proper password required (duh)). But if
in the Thunderbird description of the smtp server the user chooses not
to supply name and password that works too!

I sort of think (sic) that this is true because the client is on
$mynetwork. If it were the case that only clients not on $mynetwork
would have to provide name and password that would be OK but isn't what
I seek. I have not yet had an opportunity to test from another network.
I have tried to reduce $mynetwork to the server machine but that didn't
work.

I have tried smtpd_sasl_security_options  = noanonymous but that did not
seem to have any effect.

I have started saslauthd like so:

saslauthd -a rimap -O imap_server_machine


I doubt it very pertinent but I am running

8.2-RELEASE-p3 FreeBSD 8.2-RELEASE-p3 #0: Tue Sep 27 18:45:57 UTC 2011
   r...@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

and Postfix 2.8.7


TIA
Bernard Higonnet


Re: Cannot force Postfix to require password

2011-11-25 Thread Reindl Harald


Am 25.11.2011 12:41, schrieb Bernard T. Higonnet:
 Hello,
 
 I would like to force all users sending mail to provide a name and password.
 
 As of this moment, if, in the mail client (Thunderbird anyway), I
 specify that the smtp server requires name and password it works fine
 (that is: name is requested and proper password required (duh)). But if
 in the Thunderbird description of the smtp server the user chooses not
 to supply name and password that works too!
 
 I sort of think (sic) that this is true because the client is on
 $mynetwork. If it were the case that only clients not on $mynetwork
 would have to provide name and password that would be OK but isn't what
 I seek. I have not yet had an opportunity to test from another network.
 I have tried to reduce $mynetwork to the server machine but that didn't
 work.

a: provide configuration details (postconf -n)
b: if you are an MX you MUST NOT require auth for everyone
c: normally password is only required for relay




signature.asc
Description: OpenPGP digital signature


Re: Cannot force Postfix to require password

2011-11-25 Thread /dev/rob0
On Friday 25 November 2011 05:41:22 Bernard T. Higonnet wrote:
 I would like to force all users sending mail to provide a name and
 password.
 
 As of this moment, if, in the mail client (Thunderbird anyway), I
 specify that the smtp server requires name and password it works
 fine (that is: name is requested and proper password required
 (duh)). But if in the Thunderbird description of the smtp server
 the user chooses not to supply name and password that works too!
 
 I sort of think (sic) that this is true because the client is on
 $mynetwork. If it were the case that only clients not on $mynetwork

This sort of sounds probable. Remove permit_mynetworks from your 
smtpd_recipient_restrictions.

 would have to provide name and password that would be OK but isn't
 what I seek. I have not yet had an opportunity to test from
 another network. I have tried to reduce $mynetwork to the server
 machine but that didn't work.

Perhaps this is because the real parameter name is mynetworks? We 
count off for spelling errors here, sorry.

If this suggestion did not solve the problem, please see this before 
posting again:

http://www.postfix.org/DEBUG_README.html#mail

 I have tried smtpd_sasl_security_options  = noanonymous but that
 did not seem to have any effect.
 
 I have started saslauthd like so:
 
 saslauthd -a rimap -O imap_server_machine
 
 
 I doubt it very pertinent but I am running
 
 8.2-RELEASE-p3 FreeBSD 8.2-RELEASE-p3 #0: Tue Sep 27 18:45:57 UTC
 2011
 r...@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC 
 amd64
 
 and Postfix 2.8.7
-- 
Offlist mail to this address is discarded unless
/dev/rob0 or not-spam is in Subject: header


How to obtain the message.ID from postfix?

2011-11-25 Thread Vincenzo Romano
Hi all.
My application uses the sendmail interface of its local postfix
installation to send emails, a few thousand a day.
Of course, this has been working pretty fine so far.
Now I'd need to be able to track these emails and the best thing I
could do is to somehow obtain from sendmail/postfix
the message-ID it generated to each single submission so I can later
check the logs about delays and so on.
I've not been able to find a reliable way to do it as my issue is that
I can send several emails to the same destination address within a few
seconds and simply use the destination address and the (supposed)
submission timestamp won't help much.
Any idea whether this is doable and how to?
TIA.

--
Vincenzo Romano


Re: How to obtain the message.ID from postfix?

2011-11-25 Thread Ralf Hildebrandt
* Vincenzo Romano vincenzo.rom...@notorand.it:
 Hi all.
 My application uses the sendmail interface of its local postfix
 installation to send emails, a few thousand a day.
 Of course, this has been working pretty fine so far.
 Now I'd need to be able to track these emails and the best thing I
 could do is to somehow obtain from sendmail/postfix
 the message-ID it generated to each single submission so I can later
 check the logs about delays and so on.
 I've not been able to find a reliable way to do it as my issue is that
 I can send several emails to the same destination address within a few
 seconds and simply use the destination address and the (supposed)
 submission timestamp won't help much.
 Any idea whether this is doable and how to?

Rather use SMTP injection and then use the queueid:

MAIL FROM:hil...@charite.de
250 2.1.0 Ok
RCPT TO:vincenzo.rom...@notorand.it
250 2.1.5 Ok
DATA
354 End data with CRLF.CRLF
foo
.
250 2.0.0 Ok: queued as 3Sqgph2ghTz2r0b   !
QUIT

-- 
Ralf Hildebrandt
  Geschäftsbereich IT | Abteilung Netzwerk
  Charité - Universitätsmedizin Berlin
  Campus Benjamin Franklin
  Hindenburgdamm 30 | D-12203 Berlin
  Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
  ralf.hildebra...@charite.de | http://www.charite.de



Re: How to obtain the message.ID from postfix?

2011-11-25 Thread Vincenzo Romano
2011/11/25 Ralf Hildebrandt ralf.hildebra...@charite.de:
 * Vincenzo Romano vincenzo.rom...@notorand.it:
 Hi all.
 My application uses the sendmail interface of its local postfix
 installation to send emails, a few thousand a day.
 Of course, this has been working pretty fine so far.
 Now I'd need to be able to track these emails and the best thing I
 could do is to somehow obtain from sendmail/postfix
 the message-ID it generated to each single submission so I can later
 check the logs about delays and so on.
 I've not been able to find a reliable way to do it as my issue is that
 I can send several emails to the same destination address within a few
 seconds and simply use the destination address and the (supposed)
 submission timestamp won't help much.
 Any idea whether this is doable and how to?

 Rather use SMTP injection and then use the queueid:

 MAIL FROM:hil...@charite.de
 250 2.1.0 Ok
 RCPT TO:vincenzo.rom...@notorand.it
 250 2.1.5 Ok
 DATA
 354 End data with CRLF.CRLF
 foo
 .
 250 2.0.0 Ok: queued as 3Sqgph2ghTz2r0b       !
 QUIT


Yes, that's the SMTP dialogue.
But it seems to me that the sendmail (or any other postfix tool) can
provide it to be on a per-submission basis ...


Re: How to obtain the message.ID from postfix?

2011-11-25 Thread Wietse Venema
Vincenzo Romano:
 2011/11/25 Ralf Hildebrandt ralf.hildebra...@charite.de:
  * Vincenzo Romano vincenzo.rom...@notorand.it:
  Hi all.
  My application uses the sendmail interface of its local postfix
  installation to send emails, a few thousand a day.
  Of course, this has been working pretty fine so far.
  Now I'd need to be able to track these emails and the best thing I
  could do is to somehow obtain from sendmail/postfix
  the message-ID it generated to each single submission so I can later
  check the logs about delays and so on.
  I've not been able to find a reliable way to do it as my issue is that
  I can send several emails to the same destination address within a few
  seconds and simply use the destination address and the (supposed)
  submission timestamp won't help much.
  Any idea whether this is doable and how to?
 
  Rather use SMTP injection and then use the queueid:
 
  MAIL FROM:hil...@charite.de
  250 2.1.0 Ok
  RCPT TO:vincenzo.rom...@notorand.it
  250 2.1.5 Ok
  DATA
  354 End data with CRLF.CRLF
  foo
  .
  250 2.0.0 Ok: queued as 3Sqgph2ghTz2r0b    !
  QUIT
 
 
 Yes, that's the SMTP dialogue.
 But it seems to me that the sendmail (or any other postfix tool) can
 provide it to be on a per-submission basis ...

The Postfix sendmail command creates a temporary queue file that
is deleted as soon as the local mail pickup daemon has read the
file. So, that queue file ID is useless.

You can specify your own envelope ID on the Postfix sendmail command
line. This will be returned in delivery status notifications (as
long as the remote MTA implements the DSN RFCs).

Postfix does not log the DSN envelope ID information, but code for
that could be added to the cleanup daemon.

There is also RFC 3885 which builds a tracking mechanism on top of
the aforementioned DSN envelope ID information. But this is of limited
interest, since qmail, exim and some other MTAs don't implement DSN.

Wietse