Re: Speed up queue injection

2010-08-13 Thread Ralf Hildebrandt
* Ram :
> We have a requirement to send some research analysis mails as quickly as
> possible. 
> 
> 
> 
> Everyday after the data is available my app generates the mails in eml
> format in a directory.

What is eml format?

> Currently I have a perl script that makes parallel smtp connections on
> localhost and sends the mails.

This sounds good!

> Should I send the mails on command line.

No, using the postfix sendmail binary is actually slower.

> There are currently around 50k mails to be delivered ideally within
> 5-10 mins.

How fast are you now?
50.000/10min = 5.000/min = 83/s = that's a lot
50.000/50min = 10.000/min = 186/s = that's even more

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



reject_rbl_client

2010-08-13 Thread Vasya Pupkin
Hello.

I wonder, how postfix handles multiple entries like this:

  reject_rbl_client hostkarma.junkemailfilter.com=127.0.0.2,
  reject_rbl_client hostkarma.junkemailfilter.com=127.0.0.4,

Will it try to lookup address every time, or it is smart and will use
previous lookup result to compare with next address?


Re: reject_rbl_client

2010-08-13 Thread Ralf Hildebrandt
* Vasya Pupkin :
> Hello.
> 
> I wonder, how postfix handles multiple entries like this:
> 
>   reject_rbl_client hostkarma.junkemailfilter.com=127.0.0.2,
>   reject_rbl_client hostkarma.junkemailfilter.com=127.0.0.4,
> 
> Will it try to lookup address every time, 

No

> or it is smart and will use previous lookup result to compare with next
> address?

Indeed. And that's actually documented 

-- 
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: reject_rbl_client

2010-08-13 Thread Ralf Hildebrandt
* Ralf Hildebrandt :

> Indeed. And that's actually documented 

http://www.postfix.org/STRESS_README.html

Although the above example shows three RBL lookups (lines 4-6),
Postfix will only do a single DNS query, so it does not affect the
performance.

-- 
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: Speed up queue injection

2010-08-13 Thread Ram
Hi , 

On Fri, 2010-08-13 at 09:39 +0200, Ralf Hildebrandt wrote:
> * Ram :
> > We have a requirement to send some research analysis mails as quickly as
> > possible. 
> > 
> > 
> > 
> > Everyday after the data is available my app generates the mails in eml
> > format in a directory.
> 
> What is eml format?
> 

Mail in plain text format , mime encoded message


> > Currently I have a perl script that makes parallel smtp connections on
> > localhost and sends the mails.
> 
> This sounds good!
> 
> > Should I send the mails on command line.
> 
> No, using the postfix sendmail binary is actually slower.
> 
> > There are currently around 50k mails to be delivered ideally within
> > 5-10 mins.
> 
> How fast are you now?
> 50.000/10min = 5.000/min = 83/s = that's a lot
> 50.000/50min = 10.000/min = 186/s = that's even more
> 
Currenlty I get  40/s - 45/s 
But I want it to be atleast 100/s
Delivery is not at all an issue , because postfix gives it to further
relay boxes which are under our control again. 


This is a 8GB Ram Centos 5.4 server with SAS discs 

Do I need to increase the hardware 



Thanks
Ram







Re: Speed up queue injection

2010-08-13 Thread Ralf Hildebrandt
* Ram :

> Mail in plain text format , mime encoded message

OK!

> Currenlty I get  40/s - 45/s 
That sounds normal. Any filtering (in these cases you should inject in
a way that bypasses and filters)
> But I want it to be atleast 100/s

Two machineS?
relay boxes
> Delivery is not at all an issue , because postfix gives it to further
> relay boxes which are under our control again. 

Why not inject to the further relay boxes?
 
> Do I need to increase the hardware 

It could be :)

-- 
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: Speed up queue injection

2010-08-13 Thread Wietse Venema
Ralf Hildebrandt:
> * Ram :
> 
> > Mail in plain text format , mime encoded message
> 
> OK!
> 
> > Currenlty I get  40/s - 45/s 
> That sounds normal. Any filtering (in these cases you should inject in
> a way that bypasses and filters)
> > But I want it to be atleast 100/s
> 
> Two machineS?
> relay boxes
> > Delivery is not at all an issue , because postfix gives it to further
> > relay boxes which are under our control again. 
> 
> Why not inject to the further relay boxes?
>  
> > Do I need to increase the hardware 
> 
> It could be :)

Other options: increase input concurrency, or play with in_flow_delay.
Note that increasing your input rates will cause output rates to drop.
It's all about competing for disk access.

Wietse


Active Directory and virtual delivery agent

2010-08-13 Thread Aaron Roberts
Hi,
I'm looking for a bit of inspiration...

I have a number of linux boxes using winbind to provide UNIX system users from 
a Win2008R2 Active Directory domain.  I'm using winbind's RID idmap backend 
thing to provide consistent UNIX UIDs and GIDs across multiple servers.  For 
non-windows people, the RID is a 32 bit integer which uniquely identifies an 
object in a domain, and forms the right-most part of the Active Directory 
forest-wide SID.

A SID looks like:
S-1-5-21-993118751-601841214-1674189692-1134

The RID, in the above case, is 1134.

My UNIX UIDs are always (RID + 1000).

I want my virtual_uid_maps to fetch, from Active Directory using table_ldap, 
something like:

 ((RID derived from the objectSID attribute) + 1000).

I would also like my virtual_mailbox_maps to fetch, from Active Directory using 
table_ldap, something like:
 (primaryGroupID attribute)/(samaccountname attribute)/inbox

Can the postfix LDAP client do maths and/or concatenate retrieved attributes or 
should I be doing that elsewhere and storing the results as new attributes?

Thanks for your help,
Aaron


Re: Speed up queue injection

2010-08-13 Thread J. Roeleveld
On Friday 13 August 2010 14:23:51 Wietse Venema wrote:
> Ralf Hildebrandt:
> > * Ram :
> > > Mail in plain text format , mime encoded message
> > 
> > OK!
> > 
> > > Currenlty I get  40/s - 45/s
> > 
> > That sounds normal. Any filtering (in these cases you should inject in
> > a way that bypasses and filters)
> > 
> > > But I want it to be atleast 100/s
> > 
> > Two machineS?
> > relay boxes
> > 
> > > Delivery is not at all an issue , because postfix gives it to further
> > > relay boxes which are under our control again.
> > 
> > Why not inject to the further relay boxes?
> > 
> > > Do I need to increase the hardware
> > 
> > It could be :)
> 
> Other options: increase input concurrency, or play with in_flow_delay.
> Note that increasing your input rates will cause output rates to drop.
> It's all about competing for disk access.
> 
>   Wietse

Further options, I think:
- Disable filtering (provided the only possible connections are related to 
these emails
- put the queue on a ram-disk (8GB Ram, might leave 6GB for the queue, would 
this be sufficient?)

These are theoretical, I have no idea if this is at all possible and if this 
can cause further issues elsewhere?

--
Joost


/usr/lib/postfix/smtp: bad command startup -- throttling

2010-08-13 Thread J4
Dear knowledgeable ones,

I have just installed postfix and have some teething problems.  This
message keeps being displayed:

Aug 13 15:41:20 p2aa-app046 postfix/master[4555]: warning: process
/usr/lib/postfix/smtp pid 5394 exit status 1
Aug 13 15:41:20 p2aa-app046 postfix/master[4555]: warning:
/usr/lib/postfix/smtp: bad command startup -- throttling

The mail server should just forward all email to its mail replay, which
I set in the main.cf as :
relayhost = 10.123.12.6

Perhaps the smtpd is not installed correctly : Above it states that
/usr/lib/postfix/smtp is a bad command, which is surprising because this
does exist:
# ls -l /usr/lib/postfix/smtp*
-rwxr-xr-x 2 root root  92780 Feb 23  2009 /usr/lib/postfix/smtp
-rwxr-xr-x 1 root root 154432 Feb 23  2009 /usr/lib/postfix/smtpd

The mailq is not decreasing.


*The results of Postfinger are below:
# ./postfinger
postfinger - postfix configuration on Fri Aug 13 16:03:42 CEST 2010
version: 1.30

Warning: postfinger output may show private configuration information,
such as ip addresses and/or domain names which you do not want to show
to the public.  If this is the case it is your responsibility to modify
the output to hide this private information.  [Remove this warning with
the --nowarn option.]

--System Parameters--
mail_version = 2.5.6
hostname = p2aa-app046
uname = Linux p2aa-app046 2.6.27.19-5-pae #1 SMP 2009-02-28 04:40:21
+0100 i686 i686 i386 GNU/Linux

--Packaging information--
looks like this postfix comes from RPM package: postfix-2.5.6-1.14

--main.cf non-default parameters--
alias_maps = hash:/etc/aliases
biff = no
canonical_maps = hash:/etc/postfix/canonical
daemon_directory = /usr/lib/postfix
debug_peer_level = 9
delay_warning_time = 1h
html_directory = /usr/share/doc/packages/postfix-doc/html
inet_interfaces = localhost
inet_protocols = all
mailbox_size_limit = 0
manpage_directory = /usr/share/man
masquerade_exceptions = root
message_strip_characters = \0
mydestination = $myhostname, localhost.$mydomain
myhostname = p2aa-app046.internal.lan
readme_directory = /usr/share/doc/packages/postfix-doc/README_FILES
relayhost = 10.123.12.6
relocated_maps = hash:/etc/postfix/relocated
sample_directory = /usr/share/doc/packages/postfix-doc/samples
sender_canonical_maps = hash:/etc/postfix/sender_canonical
setgid_group = maildrop
smtp_generic_maps = hash:/etc/postfix/generic
smtpd_recipient_restrictions = permit_mynetworks#,reject_unauth_destination
smtpd_sender_restrictions = hash:/etc/postfix/access
transport_maps = hash:/etc/postfix/transport
virtual_alias_domains = hash:/etc/postfix/virtual
virtual_alias_maps = hash:/etc/postfix/virtual

--master.cf--
smtp  inet  n   -   n   -   -   smtpd
pickupfifo  n   -   n   60  1   pickup
cleanup   unix  n   -   n   -   0   cleanup
qmgr  fifo  n   -   n   300 1   qmgr
rewrite   unix  -   -   n   -   -   trivial-rewrite
bounceunix  -   -   n   -   0   bounce
defer unix  -   -   n   -   0   bounce
trace unix  -   -   n   -   0   bounce
verifyunix  -   -   n   -   1   verify
flush unix  n   -   n   1000?   0   flush
proxymap  unix  -   -   n   -   -   proxymap
smtp  unix  -   -   n   -   -   smtp
relay unix  -   -   n   -   -   smtp
-o fallback_relay=
showq unix  n   -   n   -   -   showq
error unix  -   -   n   -   -   error
discard   unix  -   -   n   -   -   discard
local unix  -   n   n   -   -   local
virtual   unix  -   n   n   -   -   virtual
lmtp  unix  -   -   n   -   -   lmtp
anvil unix  -   -   n   -   1   anvil
scache  unix--n-1scache
maildrop  unix  -   n   n   -   -   pipe
  flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
cyrus  unix-nn--pipe
  user=cyrus argv=/usr/lib/cyrus/bin/deliver -e -r ${sender} -m
${extension} ${user}
uucp  unix-nn--pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail
($recipient)
ifmailunix  -   n   n   -   -   pipe
  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix  -   n   n   -   -   pipe
  flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop
$recipient
procmail  unix  -   n   n   -   -   pipe
  flags=R user=nobody argv=/usr/bin/procmail -t -m /etc/procmailrc
${sender} ${recipient}
retry  unix--n--error
proxywrite unix--n-1proxymap

-- end of postfinger output --

For debugging purposes I added this to the main

Re: /usr/lib/postfix/smtp: bad command startup -- throttling

2010-08-13 Thread Ralf Hildebrandt
* J4 :
> Dear knowledgeable ones,
> 
> I have just installed postfix and have some teething problems.  This
> message keeps being displayed:
> 
> Aug 13 15:41:20 p2aa-app046 postfix/master[4555]: warning: process
> /usr/lib/postfix/smtp pid 5394 exit status 1
> Aug 13 15:41:20 p2aa-app046 postfix/master[4555]: warning:
> /usr/lib/postfix/smtp: bad command startup -- throttling

And Prior to that?

-- 
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: /usr/lib/postfix/smtp: bad command startup -- throttling

2010-08-13 Thread J4


On 08/13/2010 04:18 PM, Ralf Hildebrandt wrote:
> * J4 :
>   
>> Dear knowledgeable ones,
>>
>> I have just installed postfix and have some teething problems.  This
>> message keeps being displayed:
>>
>> Aug 13 15:41:20 p2aa-app046 postfix/master[4555]: warning: process
>> /usr/lib/postfix/smtp pid 5394 exit status 1
>> Aug 13 15:41:20 p2aa-app046 postfix/master[4555]: warning:
>> /usr/lib/postfix/smtp: bad command startup -- throttling
>> 
> And Prior to that?
>
I nuked the /var/log/mail file and restarted postfix.  Here are the results:
Aug 13 16:20:07 pp24-app046 postfix/postfix-script[6180]: starting the
Postfix mail system
Aug 13 16:20:07 pp24-app046 postfix/master[6181]: daemon started --
version 2.5.6, configuration /etc/postfix
Aug 13 16:20:07 pp24-app046 postfix/qmgr[6183]: 1FB36AA177:
from=, size=597, nrcpt=2 (queue active)
Aug 13 16:20:07 pp24-app046 postfix/cleanup[6184]: warning: database
/etc/postfix/virtual.db is older than source file /etc/postfix/virtual
Aug 13 16:20:07 pp24-app046 postfix/trivial-rewrite[6185]: warning:
database /etc/postfix/virtual.db is older than source file
/etc/postfix/virtual
*[SNIP]*
Aug 13 16:20:08 pp24-app046 postfix/pickup[6182]: 36B3EAA05B: uid=3
from=
Aug 13 16:20:08 pp24-app046 postfix/cleanup[6184]: 36B3EAA05B:
message-id=<20100813142008.36b3eaa...@pp24-app046.internal.lan>
Aug 13 16:20:08 pp24-app046 postfix/qmgr[6183]: 36B3EAA05B:
from=, size=717, nrcpt=1 (queue active)
Aug 13 16:20:08 pp24-app046 postfix/master[6181]: warning: process
/usr/lib/postfix/smtp pid 6186 exit status 1
Aug 13 16:20:08 pp24-app046 postfix/master[6181]: warning:
_/usr/lib/postfix/smtp: bad command startup -- throttling_
Aug 13 16:20:08 pp24-app046 postfix/local[6187]: 36B3EAA05B:
to=, orig_to=, relay=local,
delay=6.4, delays=6.4/0.01/0/0.04, dsn=2.0.0, status=sent (delivered to
mailbox)
Aug 13 16:20:08 pp24-app046 postfix/qmgr[6183]: 36B3EAA05B: removed



Re: /usr/lib/postfix/smtp: bad command startup -- throttling

2010-08-13 Thread J4
On 08/13/2010 04:15 PM, Lee Woodworth wrote:
> On 08/13/10 08:13, J4 wrote:
>> smtpd_recipient_restrictions = permit_mynetworks#,reject_unauth_destination
> Don't think this is a valid name 

I have changed it to read:
smtpd_recipient_restrictions=permit_mynetworks,reject_unauth_destination

&& postfix reload, but no change.




Re: /usr/lib/postfix/smtp: bad command startup -- throttling

2010-08-13 Thread Ralf Hildebrandt
* J4 :

> Aug 13 16:20:07 pp24-app046 postfix/cleanup[6184]: warning: database
> /etc/postfix/virtual.db is older than source file /etc/postfix/virtual
> Aug 13 16:20:07 pp24-app046 postfix/trivial-rewrite[6185]: warning:
> database /etc/postfix/virtual.db is older than source file
> /etc/postfix/virtual

Fix that. Maybe there was a change in BerkeleyDB versions...

-- 
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: /usr/lib/postfix/smtp: bad command startup -- throttling

2010-08-13 Thread J4
On 08/13/2010 04:24 PM, Ralf Hildebrandt wrote:
> * J4 :
>
>   
>> Aug 13 16:20:07 pp24-app046 postfix/cleanup[6184]: warning: database
>> /etc/postfix/virtual.db is older than source file /etc/postfix/virtual
>> Aug 13 16:20:07 pp24-app046 postfix/trivial-rewrite[6185]: warning:
>> database /etc/postfix/virtual.db is older than source file
>> /etc/postfix/virtual
>> 
> Fix that. Maybe there was a change in BerkeleyDB versions...
>
>   
I tried but it does not seem to want to:
# postalias -r -d btree virtual
postalias: warning: database virtual.db is older than source file virtual


Re: /usr/lib/postfix/smtp: bad command startup -- throttling

2010-08-13 Thread Ralf Hildebrandt
* J4 :
> On 08/13/2010 04:24 PM, Ralf Hildebrandt wrote:
> > * J4 :
> >
> >   
> >> Aug 13 16:20:07 pp24-app046 postfix/cleanup[6184]: warning: database
> >> /etc/postfix/virtual.db is older than source file /etc/postfix/virtual
> >> Aug 13 16:20:07 pp24-app046 postfix/trivial-rewrite[6185]: warning:
> >> database /etc/postfix/virtual.db is older than source file
> >> /etc/postfix/virtual
> >> 
> > Fix that. Maybe there was a change in BerkeleyDB versions...
> >
> >   
> I tried but it does not seem to want to:
> # postalias -r -d btree virtual
> postalias: warning: database virtual.db is older than source file virtual

postmap !!!

-- 
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: /usr/lib/postfix/smtp: bad command startup -- throttling

2010-08-13 Thread Erwan David
On Fri, Aug 13, 2010 at 04:29:15PM CEST, J4  said:
> On 08/13/2010 04:24 PM, Ralf Hildebrandt wrote:
> > * J4 :
> >
> >   
> >> Aug 13 16:20:07 pp24-app046 postfix/cleanup[6184]: warning: database
> >> /etc/postfix/virtual.db is older than source file /etc/postfix/virtual
> >> Aug 13 16:20:07 pp24-app046 postfix/trivial-rewrite[6185]: warning:
> >> database /etc/postfix/virtual.db is older than source file
> >> /etc/postfix/virtual
> >> 
> > Fix that. Maybe there was a change in BerkeleyDB versions...
> >
> >   
> I tried but it does not seem to want to:
> # postalias -r -d btree virtual
> postalias: warning: database virtual.db is older than source file virtual

you must use postmap...
postmap virtual should be sufficient

-- 
Erwan


Force users to auth.

2010-08-13 Thread Rachid Abdelkhalak


Hello List,

I want to force my users to authenticate using the SMTP auth even if they 
are sending emails from computers including in mynetwork range.


Here is a parts from my main.cf

mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks = 10.78.0.0/16, 10.82.0.0/19, 127.0.0.0/32
relay_domains = $mydestination, $mydomain
relayhost = [192.168.10.2]
smtpd_sender_restrictions =
permit_sasl_authenticated
permit_mynetworks


With that configuration, all emails are relayed through the mail even if i 
disable the auth in my email client, it pass through also even if i change 
the sender email address with every thing else in my mail client.


Do you have any idea that can help ?

Best regards.


--
|-Rachid Abdelkhalak
|-Network Security Engineer, MTDS
|-in morocco 080200MTDS
|-direct +212(0)537278820
|-mobile +212(0)661173437
|-14, rue 16 novembre
|-Rabat 10080 Kingdom of Morocco


RE: Force users to auth.

2010-08-13 Thread Gary Smith


> Here is a parts from my main.cf
> 
> mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
> mynetworks = 10.78.0.0/16, 10.82.0.0/19, 127.0.0.0/32
> relay_domains = $mydestination, $mydomain
> relayhost = [192.168.10.2]
> smtpd_sender_restrictions =
>   permit_sasl_authenticated
>   permit_mynetworks
> 

mynetworks = 127.0.0.0/32

If you leave in your network range, you are saying they can send without 
authentication.  Permit_sasl_authenticated will fall through to 
permit_networks.  



Re: Force users to auth.

2010-08-13 Thread Jan Kohnert
Rachid Abdelkhalak schrieb:
> mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
> mynetworks = 10.78.0.0/16, 10.82.0.0/19, 127.0.0.0/32
> relay_domains = $mydestination, $mydomain
> relayhost = [192.168.10.2]
> smtpd_sender_restrictions =
>   permit_sasl_authenticated
>   permit_mynetworks
> 
> 
> With that configuration, all emails are relayed through the mail even if i
> disable the auth in my email client, it pass through also even if i change
> the sender email address with every thing else in my mail client.

You are testing from a maschine within the mynetworks range, I suppose. Try 
changing mynetworks to 127.0.0.0/8 if you want authentication from all 
maschines except localhost.

-- 
MfG Jan


signature.asc
Description: This is a digitally signed message part.


Send Message when reject_unknown_hostname is invoked

2010-08-13 Thread jason hirsh
I am apparently having an issue with some servers whose mail is being  
rejected because of


reject_unknown_hostname

the reject was shown here

Aug 11 00:21:36 xxx postfix/smtpd[96422]: NOQUEUE: reject: RCPT  
from mail01a.yesbank.com[65.196.66.182]: 450 4.7.1  
: Helo command rejected: Host not found;  
from= to= proto=ESMTP  
helo=
Aug 11 00:21:36 batfish postfix/smtpd[96422]: generic_checks:  
name=reject_unknown_hostname status=2
Aug 11 00:21:36  postfix/smtpd[96422]: >  
mail01a.yesbank.com[65.196.66.182]: 450 4.7.1  
: Helo command rejected: Host not found
Aug 11 00:21:36  postfix/smtpd[96422]: <  
mail01a.yesbank.com[65.196.66.182]: DATA
Aug 11 00:21:36  postfix/smtpd[96422]: >  
mail01a.yesbank.com[65.196.66.182]: 554 5.5.1 Error: no valid recipients
Aug 11 00:21:36  postfix/smtpd[96422]: <  
mail01a.yesbank.com[65.196.66.182]: RSET




but no reject message went out...  Is there a way I can esnure an  
error message goes out to the sender???


it would also be nice if could cc my postmaster account when rejects  
occur

Re: Is possible reject mail with multiple destination?

2010-08-13 Thread kazabe
>
> Here's some rope:
>
> # main.cf
> header_checks = regexp:/etc/postfix/header_checks
>
> # header_checks
> IF /^(to|cc):/
> /(@*){10}/  HOLD  too many addresses in To: or CC: header
> ENDIF
>
>
>
> Note this counts the recipients listed in each header, not the combined
> total.
>
> Note this counts declared recipients listed in the headers. This has little
> or no relation to actual recipients.
>
> I wouldn't be surprised is this rejects mail you want, and passes lots of
> mail you don't want.  Use with caution.
>
> A "too many recipients might be spam" test is far better suited for a
> scoring system such as SpamAssassin, which can also do more complex checks.
>
> Consider using a content_filter or milter that incorporates SpamAssassin.

i use spamassassin to stop the spam, and work great.   the problem is
related with a "user culture".  by example: a user receive a great
joke, so forward it to others 10 users, and they forward again to
other 10 users and continue.  We need stop them.  the first idea is
talk with the users, but my boss request me an alternative technical
solution, i case of the users dont wanna cooperate.

thanks in advance


Re: Send Message when reject_unknown_hostname is invoked

2010-08-13 Thread Jeroen Geilman

On 08/13/2010 07:05 PM, jason hirsh wrote:
I am apparently having an issue with some servers whose mail is being 
rejected because of


reject_unknown_hostname

the reject was shown here

Aug 11 00:21:36 xxx


batfish ?

postfix/smtpd[96422]: NOQUEUE: reject: RCPT from 
mail01a.yesbank.com[65.196.66.182]: 450 4.7.1 
: Helo command rejected: Host not found; 
from=mailto:pbona...@yesbank.com>> 
to=mailto:di...@witheld.com>> proto=ESMTP 
helo=
Aug 11 00:21:36 batfish postfix/smtpd[96422]: generic_checks: 
name=reject_unknown_hostname status=2


Debug logging. Don't.

Aug 11 00:21:36  postfix/smtpd[96422]: > 
mail01a.yesbank.com[65.196.66.182]: 450 4.7.1 
: Helo command rejected: Host not found


Duplicated, because of debug logging. Don't.

Aug 11 00:21:36  postfix/smtpd[96422]: < 
mail01a.yesbank.com[65.196.66.182]: DATA


Useless.

Aug 11 00:21:36  postfix/smtpd[96422]: > 
mail01a.yesbank.com[65.196.66.182]: 554 5.5.1 Error: no valid recipients


Odd.

Aug 11 00:21:36  postfix/smtpd[96422]: < 
mail01a.yesbank.com[65.196.66.182]: RSET


Uselesser.





but no reject message went out...


A whut ?


Is there a way I can esnure an error message goes out to the sender???


If postfix rejects a message ?
That would be the job of the sending MTA.



it would also be nice if could cc my postmaster account when rejects occur


You really don't want to do that.

J.



Re: Send Message when reject_unknown_hostname is invoked

2010-08-13 Thread jason hirsh


On Aug 13, 2010, at 1:22 PM, Jeroen Geilman wrote:


On 08/13/2010 07:05 PM, jason hirsh wrote:


I am apparently having an issue with some servers whose mail is  
being rejected because of


reject_unknown_hostname


the reject was shown here


Aug 11 00:21:36 xxx


batfish ?


i was trying to remove my server name for email


 postfix/smtpd[96422]: NOQUEUE: reject: RCPT from  
mail01a.yesbank.com[65.196.66.182]: 450 4.7.1  
: Helo command rejected: Host not found;  
from= to= proto=ESMTP  
helo=


Aug 11 00:21:36 batfish postfix/smtpd[96422]: generic_checks:  
name=reject_unknown_hostname status=2




Debug logging. Don't.



I am debugging


Aug 11 00:21:36  postfix/smtpd[96422]: >  
mail01a.yesbank.com[65.196.66.182]: 450 4.7.1  
: Helo command rejected: Host not found




Duplicated, because of debug logging. Don't.




when I stop debugging I won't   this is the third instance of I have  
had of "lost mail"  and teh first that I had the address so I can  
chase it down


Aug 11 00:21:36  postfix/smtpd[96422]: <  
mail01a.yesbank.com[65.196.66.182]: DATA




Useless.

Aug 11 00:21:36  postfix/smtpd[96422]: >  
mail01a.yesbank.com[65.196.66.182]: 554 5.5.1 Error: no valid  
recipients




Odd.

Aug 11 00:21:36  postfix/smtpd[96422]: <  
mail01a.yesbank.com[65.196.66.182]: RSET




Uselesser.








but no reject message went out...


A whut ?

 Is there a way I can esnure an error message goes out to the  
sender???


If postfix rejects a message ?
That would be the job of the sending MTA.



The sender said to my client that he sent the message .. he was  
unaware it was rejected

I would like to reject it back to the sender so he knows..







it would also be nice if could cc my postmaster account when  
rejects occur


You really don't want to do that.


if I can't notify senders of rejects it sure beats searching logs for  
rejects


J.





Re: Speed up queue injection

2010-08-13 Thread Noel Jones

On 8/13/2010 8:22 AM, J. Roeleveld wrote:

On Friday 13 August 2010 14:23:51 Wietse Venema wrote:

Ralf Hildebrandt:

* Ram:

Mail in plain text format , mime encoded message


OK!


Currenlty I get  40/s - 45/s


That sounds normal. Any filtering (in these cases you should inject in
a way that bypasses and filters)


But I want it to be atleast 100/s


Two machineS?
relay boxes


Delivery is not at all an issue , because postfix gives it to further
relay boxes which are under our control again.


Why not inject to the further relay boxes?


Do I need to increase the hardware


It could be :)


Other options: increase input concurrency, or play with in_flow_delay.
Note that increasing your input rates will cause output rates to drop.
It's all about competing for disk access.

Wietse


Further options, I think:
- Disable filtering (provided the only possible connections are related to
these emails


Presumably the client would be in mynetworks, which should 
bypass most or all restrictions, so this is unlikely to make 
much difference.  Unless you're doing something silly like 
1000 body_check rules or using a content_filter or milter.




- put the queue on a ram-disk (8GB Ram, might leave 6GB for the queue, would
this be sufficient?)


Putting the queue on ramdisk is only for spammers who don't 
particularly care if their mail is lost.


But putting the queue on an enterprise-quality SSD would 
almost certainly help.



  -- Noel Jones


Re: Send Message when reject_unknown_hostname is invoked

2010-08-13 Thread Larry Stone

On Fri, 13 Aug 2010, jason hirsh wrote:

when I stop debugging I won't   this is the third instance of I have had of 
"lost mail"  and teh first that I had the address so I can chase it down


You didn't lose any mail. The upstream server did. You can't fix other 
server's problems and until you accept the mail (you didn't), it's not 
yours to lose.


The sender said to my client that he sent the message .. he was unaware it 
was rejected

I would like to reject it back to the sender so he knows..


You did reject it. Notification is the job of the last MTA to accept the 
message. A rejecting MTA cannot provide any notification back to the 
sender without it being at serious risk of being a backscatter source.


That the upstream MTA failed to properly notify the sender is not, let me 
make that clear, IS NOT your problem to solve. If the sender is 
complaining to you, you need to tell him or her that your system rejected 
the message (which is your right) and that failure to notify him or her of 
the rejection is a failure by a server not under your control. He needs to 
complain to his provider as to why the upstream server (most likely the 
one he is sending via or if not, very near it) is not properly notifying 
him.



if I can't notify senders of rejects it sure beats searching logs for rejects


Are you new to this? Because given the level of spam and other crud on the 
Internet, with any kind of anti-spam/anti-virus controls in place, you 
should be (or soon will be) rejecting hundreds if not thousands of 
messages per day.


-- Larry Stone
   lston...@stonejongleux.com


Re: Send Message when reject_unknown_hostname is invoked

2010-08-13 Thread Wietse Venema
jason hirsh:
> I am apparently having an issue with some servers whose mail is being  
> rejected because of
> 
> reject_unknown_hostname
> 
> the reject was shown here
> 
> Aug 11 00:21:36 xxx postfix/smtpd[96422]: NOQUEUE: reject: RCPT  
> from mail01a.yesbank.com[65.196.66.182]: 450 4.7.1  
> : Helo command rejected: Host not found;  
> from= to= proto=ESMTP  
...
> but no reject message went out...  Is there a way I can esnure an  
> error message goes out to the sender???

No reject message is sent out because your server answers with SMTP
reply code 450. This corresponds with a "Try Again" class error.
The SENDING MTA will give up after trying for several days. Only then
will the sending MTA inform sender that the message is undeliverable,

The 450 reply code means that the hostname lookup failed because
Postfix received no reply when it looked up the client hostname,
or when it tried to verify that the name really resolves to the
client IP address.

Wietse


Re: Send Message when reject_unknown_hostname is invoked

2010-08-13 Thread jason hirsh


On Aug 13, 2010, at 2:14 PM, Larry Stone wrote:


On Fri, 13 Aug 2010, jason hirsh wrote:

when I stop debugging I won't   this is the third instance of I  
have had of "lost mail"  and teh first that I had the address so I  
can chase it down


You didn't lose any mail. The upstream server did. You can't fix  
other server's problems and until you accept the mail (you didn't),  
it's not yours to lose.




well when is it acceptance for a contract offer , it is kind of har to  
say.. hey the guy that wants to spend the money  has a crappy server


teh client would rather sort through spam then  not receive email



The sender said to my client that he sent the message .. he was  
unaware it was rejected

I would like to reject it back to the sender so he knows..


You did reject it. Notification is the job of the last MTA to accept  
the message. A rejecting MTA cannot provide any notification back to  
the sender without it being at serious risk of being a backscatter  
source.




Ok that makes sense, doesn't sell well, but it makes perfect semse


That the upstream MTA failed to properly notify the sender is not,  
let me make that clear, IS NOT your problem to solve. If the sender  
is complaining to you, you need to tell him or her that your system  
rejected the message (which is your right) and that failure to  
notify him or her of the rejection is a failure by a server not  
under your control. He needs to complain to his provider as to why  
the upstream server (most likely the one he is sending via or if  
not, very near it) is not properly notifying him.


if I can't notify senders of rejects it sure beats searching logs  
for rejects


Are you new to this? Because given the level of spam and other crud  
on the Internet, with any kind of anti-spam/anti-virus controls in  
place, you should be (or soon will be) rejecting hundreds if not  
thousands of messages per day.


No I am not mew.. but this is a new problem .. legitimate email being  
bounced   I have a small customer bases.. 5 domains less then 20  
active accounts ..but I wouldn't place the host name rejection  
messages at only a couple of hundred a daythe vast majority are  
for other reasons and from other filters  those I don't care about



Jason


-- Larry Stone
  lston...@stonejongleux.com




Re: Send Message when reject_unknown_hostname is invoked [resolved]

2010-08-13 Thread jason hirsh


On Aug 13, 2010, at 2:22 PM, Wietse Venema wrote:


jason hirsh:

I am apparently having an issue with some servers whose mail is being
rejected because of

reject_unknown_hostname

the reject was shown here

Aug 11 00:21:36 xxx postfix/smtpd[96422]: NOQUEUE: reject: RCPT
from mail01a.yesbank.com[65.196.66.182]: 450 4.7.1
: Helo command rejected: Host not found;
from= to= proto=ESMTP

...

but no reject message went out...  Is there a way I can esnure an
error message goes out to the sender???


No reject message is sent out because your server answers with SMTP
reply code 450. This corresponds with a "Try Again" class error.
The SENDING MTA will give up after trying for several days. Only then
will the sending MTA inform sender that the message is undeliverable,

The 450 reply code means that the hostname lookup failed because
Postfix received no reply when it looked up the client hostname,
or when it tried to verify that the name really resolves to the
client IP address.



Ahh so where my server will try for 5 days before giving up ... the  
sender's will try for a period too THEN notify him..


Thanks..  now that I can sell.

if I can't get the clients to agree I would have to drop this  
restriction


this combined with Larry Stones comment on the Back Scatter Issues is  
of a tremendous help


thanks to all



Wietse




Re: Send Message when reject_unknown_hostname is invoked [resolved]

2010-08-13 Thread Michael Orlitzky

On 08/13/2010 02:31 PM, jason hirsh wrote:


On Aug 13, 2010, at 2:22 PM, Wietse Venema wrote:


jason hirsh:

I am apparently having an issue with some servers whose mail is being
rejected because of

reject_unknown_hostname

the reject was shown here

Aug 11 00:21:36 xxx postfix/smtpd[96422]: NOQUEUE: reject: RCPT
from mail01a.yesbank.com[65.196.66.182]: 450 4.7.1
: Helo command rejected: Host not found;
from= to= proto=ESMTP

...

but no reject message went out... Is there a way I can esnure an
error message goes out to the sender???


No reject message is sent out because your server answers with SMTP
reply code 450. This corresponds with a "Try Again" class error.
The SENDING MTA will give up after trying for several days. Only then
will the sending MTA inform sender that the message is undeliverable,

The 450 reply code means that the hostname lookup failed because
Postfix received no reply when it looked up the client hostname,
or when it tried to verify that the name really resolves to the
client IP address.



Ahh so where my server will try for 5 days before giving up ... the
sender's will try for a period too THEN notify him..


Only in response to temporary (4xx) codes. In and after Postfix 2.6, the 
response is configurable (unknown_helo_hostname_tempfail_action).


Re: Force users to auth.

2010-08-13 Thread Michael Orlitzky

On 08/13/2010 12:14 PM, Rachid Abdelkhalak wrote:


Hello List,

I want to force my users to authenticate using the SMTP auth even if
they are sending emails from computers including in mynetwork range.


If you do not want to permit the hosts in $mynetworks, do not 
permit_mynetworks.




Limit the number of messages sent per user?

2010-08-13 Thread Leonel Florin Selles
i need to limit the number of messages sent per user in postfix, there are
someone to know how can i do that.






Re: Limit the number of messages sent per user?

2010-08-13 Thread Matt Hayes
On 8/13/2010 4:56 PM, Leonel Florin Selles wrote:
> i need to limit the number of messages sent per user in postfix, there are
> someone to know how can i do that.
> 
> 
> 
> 


I believe you can use policyd to do this.


http://policyd.org

-Matt


Re: Limit the number of messages sent per user?

2010-08-13 Thread Walter Pinto
Although untested, here is how I set mine up, can anyone confirm this
would work for the OPs question?

anvil_rate_time_unit= 60m
smtpd_recipient_limit = 100
smtpd_recipient_overshoot_limit = 20
smtpd_client_message_rate_limit = 100
smtpd_client_recipient_rate_limit = 100
smtpd_client_connection_count_limit = 50


Re: Send Message when reject_unknown_hostname is invoked [resolved]

2010-08-13 Thread Noel Jones

On 8/13/2010 1:31 PM, jason hirsh wrote:


On Aug 13, 2010, at 2:22 PM, Wietse Venema wrote:


jason hirsh:

I am apparently having an issue with some servers whose
mail is being
rejected because of

reject_unknown_hostname

the reject was shown here

Aug 11 00:21:36 xxx postfix/smtpd[96422]: NOQUEUE:
reject: RCPT
from mail01a.yesbank.com[65.196.66.182]: 450 4.7.1
: Helo command rejected: Host not
found;
from= to= proto=ESMTP

...

but no reject message went out... Is there a way I can
esnure an
error message goes out to the sender???


No reject message is sent out because your server answers
with SMTP
reply code 450. This corresponds with a "Try Again" class
error.
The SENDING MTA will give up after trying for several days.
Only then
will the sending MTA inform sender that the message is
undeliverable,

The 450 reply code means that the hostname lookup failed
because
Postfix received no reply when it looked up the client
hostname,
or when it tried to verify that the name really resolves to the
client IP address.



Ahh so where my server will try for 5 days before giving up
... the sender's will try for a period too THEN notify him..

Thanks.. now that I can sell.

if I can't get the clients to agree I would have to drop this
restriction

this combined with Larry Stones comment on the Back Scatter
Issues is of a tremendous help

thanks to all



Wietse





Check your setting of unknown_hostname_reject_code.  The 
default is 450; you should change it to 550.  (So that 
affected senders will get immediate feedback that their mail 
won't be accepted, rather than their server retrying for days.)


http://www.postfix.org/postconf.5.html#reject_unknown_helo_hostname
http://www.postfix.org/postconf.5.html#unknown_hostname_reject_code

You'll also need to maintain a whitelist of clients that fail 
this test that you want to receive mail from.  Maybe you 
already do that.



  -- Noel Jones


Re: Limit the number of messages sent per user?

2010-08-13 Thread Noel Jones

On 8/13/2010 4:09 PM, Walter Pinto wrote:

Although untested, here is how I set mine up, can anyone confirm this
would work for the OPs question?

anvil_rate_time_unit= 60m
smtpd_recipient_limit = 100
smtpd_recipient_overshoot_limit = 20
smtpd_client_message_rate_limit = 100
smtpd_client_recipient_rate_limit = 100
smtpd_client_connection_count_limit = 50


policyd or some other policy service is a much better solution.

The anvil rate limits are intended to prevent runaway clients 
from melting your server, and not intended for traffic shaping 
or quotas.  Using anvil as a quota mechanism is likely to 
cause extreme delivery delays, possibly other delivery problems.


Anvil limits should be set high enough that they are never 
triggered by any legit client.



  -- Noel Jones


Re: Limit the number of messages sent per user?

2010-08-13 Thread Walter Pinto
I see, thank you.


Re: Limit the number of messages sent per user?

2010-08-13 Thread Walter Pinto
Noel,

Does your info apply to servers used only for outgoing mail as well?


Re: Limit the number of messages sent per user?

2010-08-13 Thread Noel Jones

On 8/13/2010 8:29 PM, Walter Pinto wrote:

Noel,

Does your info apply to servers used only for outgoing mail as well?


It's less likely to cause problems, but it's not very well 
suited to the task.



  -- Noel Jones