Report misses original mail

2013-08-01 Thread bitozoid
I have a host with services sending mails through sendmail binary. To get
some fault tolerance, I have set

notify_classes = bounce, delay, policy, protocol, resource, software

However, I get notifications with the headers but not the body of the
original mail. Is there a way not to miss the original mail, e.g. as an
attachment in report?


RE: smtpd_sender_login_maps and out of office messages

2013-08-01 Thread James Day
 -Original Message-
 From: owner-postfix-us...@postfix.org [mailto:owner-postfix-
 us...@postfix.org] On Behalf Of Wietse Venema
 Sent: Wednesday, July 31, 2013 12:06 PM
 To: Postfix users
 Subject: Re: smtpd_sender_login_maps and out of office messages
 
 James Day:
  Hello list,
 
  Hopefully a simple question but I can't seem to find the answer in the
  documentation (maybe my Google skills are lacking!).
 
  I'm using smtpd_sender_login_maps to ensure that users relaying only
  send mail from their own domains.
 
  Is it possible to allow an exception for out of office messages /
  automatic replies (ie where there is no sender address)?
 
 It is possible.
 
 You would need to permit the null envelope sender address before
 enforcing reject_sender_login_mismatch. At the same time this should not
 make you an open relay for mail from .
 
 For these reasons I suggest moving reject_sender_login_mismatch out of
 smtpd_recipient_restrictions, and into smtpd_sender_restrictions.
 
 /etc/postfix/main.cf:
 smtpd_sender_restrictions =
   check_sender_access hash:/etc/postfix/sender_access
   reject_sender_login_mismatch
 
 /etc/postfix/sender_access:
  permit
 
 The  is a surrogate for the empty adress, and is configured with the
 smtpd_null_access_lookup_key parameter. Postfix never queries a table
 with the null-string lookup key.
 
   Wietse

Thanks Wietse.

This is my working configuration (hopefully you can't see any issues)

/etc/postfix/main.cf

...

smtpd_recipient_restrictions =
permit_sasl_authenticated
reject

smtpd_sender_restrictions =
check_sender_access hash:/etc/postfix/sender_access
reject_sender_login_mismatch

...

/etc/postfix/sender_access:
 permit

Kind regards,

James Day


Re: Report misses original mail

2013-08-01 Thread Wietse Venema
bitozoid:
 I have a host with services sending mails through sendmail binary. To get
 some fault tolerance, I have set
 
 notify_classes = bounce, delay, policy, protocol, resource, software

This send an ADDITIONAL notification to the system administrator.

The original message content is sent to the envelope sender only
(subject to bounce_size_limit restrictions).

Sending automatic notifications is a tricky business.  It may result
in infinite loops or worse, one message becoming multiple messages
which in turn become an avalanche of mail.

Safety is one reason why Postfix avoids returning multiple copies
of undeliverable mail.  Privacy is another: most delivery problems
are unrelated to the message content, so there is no need to always
give the content to the system administrator.

It's easy enough to add one bounce daemon parameter that flips the
switch from headers only to full message for postmaster
notifications. Unfortunately, I have no time to implement that.

Wietse


Re: Report misses original mail

2013-08-01 Thread bitozoid
As an alternative for fault tolerance and debugging, I think I can just
archive every mail (too few):

sender_bcc_maps = static:localarchive
recipient_bcc_maps = static:localarchive

and then alias localarchive to a maildir folder. However, I don't want to
keep any other local mailbox. That is, if a mail is sent to a local account
and no alias is defined, I'd like to get an error (not to miss any
message). Is there a way to set that?




On Thu, Aug 1, 2013 at 1:36 PM, Wietse Venema wie...@porcupine.org wrote:

 bitozoid:
  I have a host with services sending mails through sendmail binary. To get
  some fault tolerance, I have set
 
  notify_classes = bounce, delay, policy, protocol, resource, software

 This send an ADDITIONAL notification to the system administrator.

 The original message content is sent to the envelope sender only
 (subject to bounce_size_limit restrictions).

 Sending automatic notifications is a tricky business.  It may result
 in infinite loops or worse, one message becoming multiple messages
 which in turn become an avalanche of mail.

 Safety is one reason why Postfix avoids returning multiple copies
 of undeliverable mail.  Privacy is another: most delivery problems
 are unrelated to the message content, so there is no need to always
 give the content to the system administrator.

 It's easy enough to add one bounce daemon parameter that flips the
 switch from headers only to full message for postmaster
 notifications. Unfortunately, I have no time to implement that.

 Wietse



Re: Report misses original mail

2013-08-01 Thread Wietse Venema
bitozoid:
 As an alternative for fault tolerance and debugging, I think I can just
 archive every mail (too few):
 
 sender_bcc_maps = static:localarchive
 recipient_bcc_maps = static:localarchive
 
 and then alias localarchive to a maildir folder. However, I don't want to
 keep any other local mailbox. That is, if a mail is sent to a local account
 and no alias is defined, I'd like to get an error (not to miss any
 message). Is there a way to set that?

Regular expressions to the rescue:

recipient_bcc_maps = pcre:/path/to/file

And a pattern that excludes local recipients:

if !/@example\.com$/
/./ localarchive
endif

References:
http://www.postfix.org/pcre_table.5.html

Wietse


db.h in a non-standard place

2013-08-01 Thread Leo Baltus
Hi,

Our Linux compile environment has changed so that db.h is not in a
standard place any more.

However makedefs seem to insist that is should be in /usr/include

My initial make reads something like so:

make -f Makefile.init makefiles CCARGS=-DHAS_DB -I$db/include \
AUXLIBS=-L$db/lib -ldb

Like http://www.postfix.org/DB_README.html tells me.

Attached patch detects '-DHAS_DB' and just skips further tests.

Would that be acceptable for future releases?


-- 
Leo Baltus, internetbeheerder /\
NPO ICT Internet Services/NPO/\
Sumatralaan 45, 1217 GP Hilversum, Filmcentrum, west \  /\/
serviced...@omroep.nl, 035-6773555\/
--- postfix-2.10.1/makedefs.orig2013-08-01 15:07:56.0 +0200
+++ postfix-2.10.1/makedefs 2013-08-01 15:09:01.0 +0200
@@ -278,6 +278,7 @@
 Linux.2*)  SYSTYPE=LINUX2
case $CCARGS in
 *-DNO_DB*) ;;
+*-DHAS_DB*) ;;
 *) if [ -f /usr/include/db.h ]
then
: we are all set
@@ -350,6 +351,7 @@
 Linux.3*)  SYSTYPE=LINUX3
case $CCARGS in
 *-DNO_DB*) ;;
+*-DHAS_DB*) ;;
 *) if [ -f /usr/include/db.h ]
then
: we are all set


Re: db.h in a non-standard place

2013-08-01 Thread Wietse Venema
Leo Baltus:
 Hi,
 
 Our Linux compile environment has changed so that db.h is not in a
 standard place any more.
 
 However makedefs seem to insist that is should be in /usr/include
 
 My initial make reads something like so:
 
 make -f Makefile.init makefiles CCARGS=-DHAS_DB -I$db/include \
   AUXLIBS=-L$db/lib -ldb
 
 Like http://www.postfix.org/DB_README.html tells me.
 
 Attached patch detects '-DHAS_DB' and just skips further tests.
 
 Would that be acceptable for future releases?

I agree. There needs to be a way for you to specify the location
of Berkeley DB include and library files, and to have the makedefs
script not find those locations for you.

Wietse


Re: mail transport unavailable

2013-08-01 Thread Ralf Hildebrandt
* LuKreme krem...@kreme.com:
 
 On 31 Jul 2013, at 21:52 , Noel Jones njo...@megan.vbhcs.org wrote:
 
  Looks as if you clobbered your smtp transport smtp unix ... smtp
  
  smtp   inet  n   -   n   -   1   postscreen
  smtpd  pass  -   -   n   -   -   smtpd
 
 Am I suppose to have three lines?
 
 adding 
 
 smtp unix - - - - - smtp
 
 didn't solve the problem, though it led to many different errors.
 
 Jul 31 22:16:45 mail postfix/smtp[576]: fatal: unknown service: smtp/tcp
 Jul 31 22:16:45 mail kernel: Jul 31 22:16:45 mail postfix/smtp[576]: fatal: 
 unknown service: smtp/tcp

cp -a /etc/services /var/spool/postfix/etc

-- 
[*] sys4 AG

http://sys4.de, +49 (89) 30 90 46 64
Franziskanerstraße 15, 81669 München

Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer
Aufsichtsratsvorsitzender: Florian Kirstein


greylist.db corruption

2013-08-01 Thread Niclas Arndt
Hi,

I hope I am right to post this here.

I use openSUSE 12.3 with Postfix and the basic greylist.pl policy and Spamhaus 
lookup. The last few months I have had problems with greylist.db corruption 
(both in old openSUSE 11.3 and current 12.3). 

If I place the Spamhaus lookup before the policy check, I seem to be safe. 
However, I suspect that this puts an unnecessary load on Spamhaus, so I would 
like to first check the greylist policy and then do the Spamhaus lookup, but 
this causes greylist.db corruption.

Am I doing it wrong or am I receiving a new type of spam messages or 
transmission patterns that cause corruption? Has anybody else noticed this 
lately?

Kind regards

Niclas
  

Re: greylist.db corruption

2013-08-01 Thread Wietse Venema
Niclas Arndt:
[ Charset ISO-8859-1 unsupported, converting... ]
 Hi,
 
 I hope I am right to post this here.
 
 I use openSUSE 12.3 with Postfix and the basic greylist.pl policy
 and Spamhaus lookup. The last few months I have had problems with
 greylist.db corruption (both in old openSUSE 11.3 and current
 12.3).

Which greylist program are you using? The one bundled with
Postfix has been tested only with the default *BSD Berkeley
DB implementation (db1.85). It should probably be retired.

Wietse