Re: Mail getting flagged as spam

2014-11-01 Thread Tiemo Kieft
Hi again,

> in context of "www" i had a customer inisting replace "www.example.com 
> " with "example.com " in all 
> mailheaders and indeed he was right that after the change newsletters to 
> customers of our largest ISP no longer got tagged as spam - that was years 
> ago, after that i continued to make this replace in any webscript and avoid 
> "www." as primary name for any machine supposed to send mail (maybe here and 
> there it get a small penalty suspecting another hacked webserver or so)

I’ve added a new A record for mail.infinitesimal.nl 
 and set the hostname of the machine to 
mail.infinitesimal.nl . Still the exact same 
problem persists, I’ve created a new Gmail account, and set a legitimate email 
to both of them. The @infinitesimal.nl  is accepted 
but the @isogram.nl  is flagged as spam.

Unfortunately there is no real way to know why Google is behaving like this. 
Could it be a configuration error?

—
- Tiemo



Re: Mail getting flagged as spam

2014-11-01 Thread Andrew Beverley
On Sat, 2014-11-01 at 10:55 +0100, Tiemo Kieft wrote:
> Unfortunately there is no real way to know why Google is behaving like
> this. Could it be a configuration error?

Personally I think that the most likely explanation is that Google does
not have enough history of the IP address. The more (genuine) mail you
send from an IP address, and the longer you do it for, the less likely
the email will be classed as spam.

I found that having exactly the same configuration with the exact same
emails, but sending from an IPV6 address instead, was enough to make the
emails go into Gmail's spam.

You might like to check your IP addresses at the site below. It's not
Google, but it will give you a general idea as to how your IP addresses
are seen by receiving mail servers:

https://senderscore.org/lookup.php

Andy




RE: Mail getting flagged as spam

2014-11-01 Thread Marius Gologan
Hi,

 

Probably that domain was involved in mass mailing in the past (mostly 
unsolicited). I don’t see other reason for which they needed mailgun in spf.

Send an email to gmail, from another source which works perfectly and include 
the www.domain.com in the body. If still goes to spam, the domain is 
blacklisted in gmail.

 

Marius.

 

 

From: owner-postfix-us...@postfix.org [mailto:owner-postfix-us...@postfix.org] 
On Behalf Of Tiemo Kieft
Sent: Saturday, November 1, 2014 11:55 AM
To: postfix-users@postfix.org
Subject: Re: Mail getting flagged as spam

 

Hi again,





in context of "www" i had a customer inisting replace "www.example.com" with 
"example.com" in all mailheaders and indeed he was right that after the change 
newsletters to customers of our largest ISP no longer got tagged as spam - that 
was years ago, after that i continued to make this replace in any webscript and 
avoid "www." as primary name for any machine supposed to send mail (maybe here 
and there it get a small penalty suspecting another hacked webserver or so)

 

I’ve added a new A record for mail.infinitesimal.nl and set the hostname of the 
machine to mail.infinitesimal.nl. Still the exact same problem persists, I’ve 
created a new Gmail account, and set a legitimate email to both of them. The 
@infinitesimal.nl is accepted but the @isogram.nl is flagged as spam.

 

Unfortunately there is no real way to know why Google is behaving like this. 
Could it be a configuration error?

 

—

- Tiemo

 



Re: What exactly does that mean: maildrop/6B8F696F6: error writing 2737698C0: no recipients specified

2014-11-01 Thread Andreas Schulze
Viktor Dukhovni:
> They are best left alone, but can be deleted with care, something
> along the lines of:
> 
>   # postfix stop
>   # postsuper -s
>   # cd /var/spool/postfix
>   # (find defer -type f -print;
>  find deferred -type f -print) | 
> perl -lne '
>   if (m{^defer/(?:.*/)?(.*)$}) {
>   $defer{$1} = $_;
>   } elsif (m{^deferred/(?:.*/)?(.*)$}) {
>   delete $defer{$1};
>   }
>   END {
>   while (($id, $path) = each(%defer)) {
>   if (unlink($path)) {
>   printf "%s defer log deleted\n", $id;
>   } else {
>   warn "unlink: $path: $!\n";
>   }
>   }
>   }
>   '

I had a similiar issue some years ago. A heavy loaded defer queue was so slow.
I noticed these orphaned files in defer/. I had the feeling the qmgr acts 
faster after removing them.
For that reason I implemented a cronjob to search (but not delete) orphaned 
files once a day.

cd ${QUEUE_DIR}/defer/
for deferinfo in `find . -type f`; do
  if [ ! -f "../deferred/${deferinfo}" ]; then
ORPHANED_FILES="${ORPHANED_FILES} ${QUEUE_DIR}/defer/${deferinfo}"
fi
done
if test ! -z "${ORPHANED_FILES}"; then
  echo
  echo '* Infodateien ohne Queuedateien:'
  echo ''
  echo ${ORPHANED_FILES} | xargs ls -la
fi

That cronjob produces output very rarely but mostly after manual interaction
( postsuper -r ALL and so )

Andreas


Re: Mail getting flagged as spam

2014-11-01 Thread Tiemo Kieft
Hi,

> Probably that domain was involved in mass mailing in the past (mostly 
> unsolicited). I don’t see other reason for which they needed mailgun in spf.
> Send an email to gmail, from another source which works perfectly and include 
> the www.domain.com  in the body. If still goes to 
> spam, the domain is blacklisted in gmail.

The SPF record was mine, I used Maildrop to send some test mails. I highly 
doubt isogram.nl  is on any blacklist, I tried what you 
suggested, the mail didn’t get flagged as spam. Also, the domain appears on no 
blacklist as far as I can tell.

> Personally I think that the most likely explanation is that Google does
> not have enough history of the IP address. The more (genuine) mail you
> send from an IP address, and the longer you do it for, the less likely
> the email will be classed as spam.

Yeah, there appears to be no other option, since the config seems OK.

> You might like to check your IP addresses at the site below. It's not
> Google, but it will give you a general idea as to how your IP addresses
> are seen by receiving mail servers:
> 
> https://senderscore.org/lookup.php 

I did that, it didn’t report much of anything. I guess they don’t have any data 
on the IP.

--
- Tiemo



force queue to deliver

2014-11-01 Thread li...@rhsoft.net

after some troubles with lmtpd mails are in the queue

postsuper -r ALL
postsuper: Requeued: 15 messages

postqueue -f

well, "postfix/qmgr" still shows (queue active)


how to force postfix to deliver *any* mail in the queue independent how 
often that happened due timeout on the destination in the past hours?


Re: force queue to deliver

2014-11-01 Thread li...@rhsoft.net



Am 01.11.2014 um 18:43 schrieb li...@rhsoft.net:

after some troubles with lmtpd mails are in the queue

postsuper -r ALL
postsuper: Requeued: 15 messages

postqueue -f

well, "postfix/qmgr" still shows (queue active)


how to force postfix to deliver *any* mail in the queue independent how
often that happened due timeout on the destination in the past hours?


i don't get it - the messages are in the active queue since "postqueue 
-p" shows an asterisk, "postfix flush" don't change anything and after 
restart postfix still "(queue active)" messages in the logs


we talk here about a queue with 19 messages and even some incoming new 
ones get "(queue active)" logs with no delivery attempts to lmtpd


from time to time 1 or 2 messages are tried to deliver with success but 
why don't "postfix flush" the xpected and try to deliver *all*


lmtp_connection_cache_time_limit= 600
lmtp_connection_reuse_time_limit= 600
lmtp_destination_concurrency_limit  = 1
dbmail-lmtp_destination_concurrency_limit   = 1
dbmail-lmtp_destination_rate_delay  = 0
_

* The message is in the active queue, i.e. the message is selected for 
delivery


in fact any message has the asterisk
_

Nov  1 19:20:06 mail postfix/master[4886]: terminating on signal 15
Nov  1 19:20:07 mail postfix/postfix-script[5479]: starting the Postfix 
mail system
Nov  1 19:20:07 mail postfix/master[5481]: daemon started -- version 
2.11.3, configuration /etc/postfix
Nov  1 19:20:07 mail postfix/qmgr[5483]: 3jVTDt122gz38: from=<**>, 
size=75721, nrcpt=1 (queue active)
Nov  1 19:20:07 mail postfix/qmgr[5483]: 3jVT9H4FzCz32: from=<**>, 
size=5, nrcpt=1 (queue active)
Nov  1 19:20:07 mail postfix/qmgr[5483]: 3jVT4b1Hbpz3B: from=<**>, 
size=6152, nrcpt=1 (queue active)
Nov  1 19:20:07 mail postfix/qmgr[5483]: 3jVT7c3hR2z2W: from=<**>, 
size=243312, nrcpt=1 (queue active)
Nov  1 19:20:07 mail postfix/qmgr[5483]: 3jVT4b28Dgz2q: from=<**>, 
size=4580, nrcpt=1 (queue active)
Nov  1 19:20:07 mail postfix/qmgr[5483]: 3jVTFc1ZGrz3C: from=<**>, 
size=46551, nrcpt=1 (queue active)
Nov  1 19:20:07 mail postfix/qmgr[5483]: 3jVT6p1hX8z3H: from=<**>, 
size=354985, nrcpt=1 (queue active)
Nov  1 19:20:07 mail postfix/qmgr[5483]: 3jVT4b24tyz37: from=<**>, 
size=228040, nrcpt=1 (queue active)
Nov  1 19:20:07 mail postfix/qmgr[5483]: 3jVT7s5tKWz2h: from=<**>, 
size=77336, nrcpt=1 (queue active)
Nov  1 19:20:07 mail postfix/qmgr[5483]: 3jVT8R0v7Sz34: from=<**>, 
size=15198, nrcpt=1 (queue active)
Nov  1 19:20:07 mail postfix/qmgr[5483]: 3jVT4b2BFzz3G: from=<**>, 
size=19747, nrcpt=1 (queue active)
Nov  1 19:20:07 mail postfix/qmgr[5483]: 3jVT4b1QgDz31: from=<**>, 
size=1875, nrcpt=4 (queue active)
Nov  1 19:20:07 mail postfix/qmgr[5483]: 3jVT4b12Mfz3R: from=<**>, 
size=85639, nrcpt=1 (queue active)
Nov  1 19:20:07 mail postfix/qmgr[5483]: 3jVT4b1tQpz33: from=<**>, 
size=241133, nrcpt=1 (queue active)
Nov  1 19:20:07 mail postfix/qmgr[5483]: 3jVT7y5lxRz2k: from=<**>, 
size=147898, nrcpt=1 (queue active)
Nov  1 19:20:07 mail postfix/qmgr[5483]: 3jVT4b1jzhz3P: from=<**>, 
size=16768, nrcpt=1 (queue active)
Nov  1 19:20:07 mail postfix/qmgr[5483]: 3jVT4b2Gbtz3M: from=<**>, 
size=103962, nrcpt=1 (queue active)
Nov  1 19:20:07 mail postfix/qmgr[5483]: 3jVT4b225mz36: from=<**>, 
size=72917, nrcpt=1 (queue active)


Re: force queue to deliver

2014-11-01 Thread Wietse Venema
li...@rhsoft.net:
> after some troubles with lmtpd mails are in the queue
> 
> postsuper -r ALL
> postsuper: Requeued: 15 messages
> 
> postqueue -f
> 
> well, "postfix/qmgr" still shows (queue active)

In other words, it is waiting fir delivery agents.

> how to force postfix to deliver *any* mail in the queue independent how 
> often that happened due timeout on the destination in the past hours?

It is waiting for delivery agents.

Wietse


Re: force queue to deliver

2014-11-01 Thread li...@rhsoft.net



Am 01.11.2014 um 19:35 schrieb Wietse Venema:

li...@rhsoft.net:

after some troubles with lmtpd mails are in the queue

postsuper -r ALL
postsuper: Requeued: 15 messages

postqueue -f

well, "postfix/qmgr" still shows (queue active)


In other words, it is waiting for delivery agents.


how to force postfix to deliver *any* mail in the queue independent how
often that happened due timeout on the destination in the past hours?


It is waiting for delivery agents.


how long?

anyways, after it started to deliver all queued mails i realized that it 
is always the same junk-message from china making dbmail-lmtpd hang, 
saved it with postcat, deleted it from the queue and delivery started to 
work fine again for the rest


postcat file is on the wy to dbmail upstream


Re: force queue to deliver

2014-11-01 Thread Wietse Venema
li...@rhsoft.net:
> >> well, "postfix/qmgr" still shows (queue active)
> >
> > In other words, it is waiting for delivery agents.
> >
> >> how to force postfix to deliver *any* mail in the queue independent how
> >> often that happened due timeout on the destination in the past hours?
> >
> > It is waiting for delivery agents.
> 
> how long?

The Postfix SMTP/LMTP client has time limits for DNS lookups, TCP
handshakes, SMTP handshakes, TLS handshakes, and for individial
SMTP/LMTP commands.

Without a crystal ball I can't say which of the time limits is in
effect.

> anyways, after it started to deliver all queued mails i realized that it 
> is always the same junk-message from china making dbmail-lmtpd hang, 
> saved it with postcat, deleted it from the queue and delivery started to 
> work fine again for the rest

You have delivery concurrency of 1? Why?

Wietse


Re: force queue to deliver

2014-11-01 Thread li...@rhsoft.net



Am 01.11.2014 um 19:58 schrieb Wietse Venema:

li...@rhsoft.net:

well, "postfix/qmgr" still shows (queue active)


In other words, it is waiting for delivery agents.


how to force postfix to deliver *any* mail in the queue independent how
often that happened due timeout on the destination in the past hours?


It is waiting for delivery agents.


how long?


The Postfix SMTP/LMTP client has time limits for DNS lookups, TCP
handshakes, SMTP handshakes, TLS handshakes, and for individial
SMTP/LMTP commands.

Without a crystal ball I can't say which of the time limits is in
effect.


there was nothing further in the logs, also after "postfix flush"
however, the real problem where that the lmtpd started to hang in case 
of the oldest message with a NULL char (reported upstream)



anyways, after it started to deliver all queued mails i realized that it
is always the same junk-message from china making dbmail-lmtpd hang,
saved it with postcat, deleted it from the queue and delivery started to
work fine again for the rest


You have delivery concurrency of 1? Why?


dbmail-lmtpd is single threaded and would anyways process only one 
message at the same time - the setting is recommended upstream


however, the message should not have made it through spmass-milter

1.6 NULL_IN_BODY FULL: Message has NUL (ASCII 0) byte in message
UPDATED: /etc/mail/spamassassin/local.cf
 238a239
 > score NULL_IN_BODY 8.0


Re: force queue to deliver

2014-11-01 Thread Wietse Venema
li...@rhsoft.net:
> > The Postfix SMTP/LMTP client has time limits for DNS lookups, TCP
> > handshakes, SMTP handshakes, TLS handshakes, and for individial
> > SMTP/LMTP commands.
> >
> > Without a crystal ball I can't say which of the time limits is in
> > effect.
> 
> there was nothing further in the logs, also after "postfix flush"
> however, the real problem where that the lmtpd started to hang in case 
> of the oldest message with a NULL char (reported upstream)

The Postfix client will log a timeout event after a while. Until
then it makes no noise.

> >> anyways, after it started to deliver all queued mails i realized that it
> >> is always the same junk-message from china making dbmail-lmtpd hang,
> >> saved it with postcat, deleted it from the queue and delivery started to
> >> work fine again for the rest
> >
> > You have delivery concurrency of 1? Why?
> 
> dbmail-lmtpd is single threaded and would anyways process only one 
> message at the same time - the setting is recommended upstream

Single threaded, and it locks up with nulls? Bleh.

> however, the message should not have made it through spmass-milter
> 
> 1.6 NULL_IN_BODY FULL: Message has NUL (ASCII 0) byte in message
> UPDATED: /etc/mail/spamassassin/local.cf
>   238a239
>   > score NULL_IN_BODY 8.0

Postfix has a diaper for that, called message_strip_characters.
This was originally implemented for buggy Microsoft servers.

Wietse


Re: force queue to deliver

2014-11-01 Thread li...@rhsoft.net



Am 01.11.2014 um 20:20 schrieb Wietse Venema:

li...@rhsoft.net:

The Postfix SMTP/LMTP client has time limits for DNS lookups, TCP
handshakes, SMTP handshakes, TLS handshakes, and for individial
SMTP/LMTP commands.

Without a crystal ball I can't say which of the time limits is in
effect.


there was nothing further in the logs, also after "postfix flush"
however, the real problem where that the lmtpd started to hang in case
of the oldest message with a NULL char (reported upstream)


The Postfix client will log a timeout event after a while. Until
then it makes no noise

>

You have delivery concurrency of 1? Why?


dbmail-lmtpd is single threaded and would anyways process only one
message at the same time - the setting is recommended upstream


Single threaded, and it locks up with nulls? Bleh.


sadly yes


however, the message should not have made it through spmass-milter

1.6 NULL_IN_BODY FULL: Message has NUL (ASCII 0) byte in message
UPDATED: /etc/mail/spamassassin/local.cf
   238a239
   > score NULL_IN_BODY 8.0


Postfix has a diaper for that, called message_strip_characters.
This was originally implemented for buggy Microsoft servers


thanks for the hint

i added the reject param for that since this was the first message where 
the SA-rule got triggered and the milter would reject it too, well last 
but not least it was c lear junk mail


message_reject_characters = \0


postfix with both smtpd and smtpd/haproxy

2014-11-01 Thread Roman Naumenko

Hi,

I'm trying to setup postfix behind haproxy for hailover and 
loadbalancing purpose. It works fine with


smtpd_upstream_proxy_protocol = haproxy

but internal systems like amavis can't deliver mail locally, because :25 
is no longer accepts standard smtp.


Is it possible to configure non-proxy smtpd on port 25 and proxy-smtpd 
on other simultaneously?


Thank you,
--Roman