Re: Postfix/mysql - vacation problem

2009-04-03 Thread Sebastian Chociwski
Problem solved with postfixadmin list. I got error with alias which should
be :
g...@eurimage.pl -> g...@eurimage.pl,grom#eurimage...@vacation.eurimage.pl

mouss pisze:
> Sebastian Chociwski a écrit :

>> And get the vacation.pl from postfixadmin. In alias area I created alias
>> for g...@eurimage.pl -> g...@eurimage.pl,g...@vacation.eurimage.pl
>> (vacation transport) and when I recive mail I got :
>
> you'll get more help on a postfixadmin list. it may be a bug in
> vacation.pl or in the perl functions that it calls to check address
> validity. if you post on a postfixadmin list, provide a sample message
> so that the guys there can reproduce the problem.
>
>

-- 
best regards,
Sebastian Chociwski



Inbound Only postfix gateway on home network/server lab

2009-04-03 Thread David Denny

I am setting up an inbound postfix instance to run on a dmz host.

Its purpose is to accept mail only for specific relay_recipients and to 
transport them to an internal postfix server.


I have demonstrated proof of concept with this * but there is a tweak I 
cannot easily figure out from the documentation after having tried a few 
obvious options and reset them. Something basic is missing from my 
understanding, correcting which would be appreciated.


Firstly I need to be sure that nothing entering this server will go out 
to the internet.


All traffic needs to go to the internal smtp box which maildrops stuff 
into local unix accounts.


There is a third box running outbound postfix which is meant to receive 
outbound mail from clients and have access (in the first place) to my 
ISPs smarthost.


If this seems overengineered, sorry. But I am attempting to learn the 
details and having things on separate boxes helps.


Anyway, the issue I am tussling with is that mails destined from 
internal hosts don't resolve locally and instead escape out to my ISP's 
smarthost where they are picked up with an invalid domain and bounced. I 
would like to stop this behaviour.


Which fragments of my various configuration files would be useful to 
help diagnose this?


I observe that mails are escaping directly from this machine and not 
going to the internal maildrop server nor to the outbound smtp box. In 
fact, the inbound postfix service is attempting to resolve the internal 
address as an Internet domain "Diagnostic-Code: X-Postfix; Host or 
domain name not found. Name service error for name=x.y 
type=: Host not found".


where x.y is the internal host I was trying to send to.

Anyway this is probably dead simple to someone :-(

Thanks in advance
DD
Croydon, UK

* with a previous ISP but have now transferred to another and would like 
to revive control of inbound mail.



begin:vcard
fn:David Denny
n:Denny;David
email;internet:reply...@daviddenny.co.uk
tel;cell:+44 (0) 7834 773 673
version:2.1
end:vcard



Inbound Only postfix gateway on home network/server lab CORRECTED **

2009-04-03 Thread David Denny

I am setting up an inbound postfix instance to run on a dmz host.

Its purpose is to accept mail only for specific relay_recipients and to
transport them to an internal postfix server.

I have demonstrated proof of concept with this * but there is a tweak I
cannot easily figure out from the documentation after having tried a few
obvious options and reset them. Something basic is missing from my
understanding, correcting which would be appreciated.

Firstly I need to be sure that nothing entering this server will go out
to the internet.

All traffic needs to go to the internal smtp box which maildrops stuff
into local unix accounts.

There is a third box running outbound postfix which is meant to receive
outbound mail from clients and have access (in the first place) to my
ISPs smarthost.

If this seems overengineered, sorry. But I am attempting to learn the
details and having things on separate boxes helps.

** Anyway, the issue I am tussling with is that mails destined FOR
internal hosts don't resolve locally and instead escape out to my ISP's
smarthost where they are picked up with an invalid domain and bounced. I
would like to stop this behaviour.

** Actually they don't go to the smarthost. Please see later

Which fragments of my various configuration files would be useful to
help diagnose this?

I observe that mails are escaping directly from this machine and not
going to the internal maildrop server nor to the outbound smtp box. In
fact, the inbound postfix service is attempting to resolve the internal
address as an Internet domain "Diagnostic-Code: X-Postfix; Host or
domain name not found. Name service error for name=x.y
type=: Host not found".

where x.y is the internal host I was trying to send to.

Anyway this is probably dead simple to someone :-(

Thanks in advance
DD
Croydon, UK

* with a previous ISP but have now transferred to another and would like
to revive control of inbound mail.



begin:vcard
fn:David Denny
n:Denny;David
email;internet:reply...@daviddenny.co.uk
tel;cell:+44 (0) 7834 773 673
version:2.1
end:vcard



Rejecting mail sent specific user extensions

2009-04-03 Thread Humopat
Hi all,

I'm quite new at postfix, after long years using qmail.
I'm really enjoying it for now but I'm a little lost on something and I hope
I can get help from you because I couldn't find anything online.


I'm using extensions so all emails sent to
humopat+anyth...@mydomain.comwill be
accepted and forwarded to my mailbox.
But some extensions receive too many spams and I want to get rid of them,
like humopat+...@mydomain.com .

I want this extension, and only this extension, to bounce at the "rcpt to"
step.

Of course I could use something like "smtpd_recipient_restrictions =
check_recipient_access (...)"
but I came to think it would be easier to define this forbidden address in
the virtual alis maps file, so I don't have too many files to handle, like:

postmas...@mydomain.com mymail...@mydomain.com
humo...@mydomain.com mymail...@mydomain.com
humopat+...@mydomain.comREJECT

I tried exactly that syntax but it doesn't work.


I guess I'm a bit stupid because I think thousands of persons need this
function so... it must be very easy to achieve somehow.

How do you do that kind of thing?


Thank you all!


Re: Rejecting mail sent specific user extensions

2009-04-03 Thread Wietse Venema
Humopat:
> I want this extension, and only this extension, to bounce at the "rcpt to"
> step.
> 
> Of course I could use something like "smtpd_recipient_restrictions =
> check_recipient_access (...)"

Which makes sense, considering that this is an ACCESS table.

> but I came to think it would be easier to define this forbidden address in
> the virtual alis maps file, so I don't have too many files to handle, like:
> 
> postmas...@mydomain.com mymail...@mydomain.com
> humo...@mydomain.com mymail...@mydomain.com
> humopat+...@mydomain.comREJECT
> 
> I tried exactly that syntax but it doesn't work.

Did you try the documentation? man 5 virtual.

Wietse


Re: Rejecting mail sent specific user extensions

2009-04-03 Thread Wietse Venema
/etc/postfix/transport:
humopat+...@mydomain.com error:5.1.1 user unknown

/etc/postfix/main.cf:
transport_maps = hash:/etc/postfix/transport

Wietse


Re: Inbound Only postfix gateway on home network/server lab

2009-04-03 Thread David Denny

Wietse Venema wrote:

David Denny:
  
Which fragments of my various configuration files would be useful to 
help diagnose this?



  


# postconf -c /etc/postfix_daviddenny.co.uk/ -n
alternate_config_directories = /etc/postfix /etc/postfix_chavin.net
/etc/postfix_yaravi.com /etc/postfix_daviddenny.net
command_directory = /usr/local/sbin
config_directory = /etc/postfix_daviddenny.co.uk/
daemon_directory = /usr/local/libexec/postfix
debug_peer_level = 2
html_directory = /usr/local/share/doc/postfix/html
inet_interfaces = 10.0.3.227
inet_protocols = all
local_recipient_maps =
mail_owner = _postfix
mailq_path = /usr/local/sbin/mailq
manpage_directory = /usr/local/man
mydestination =
mynetworks = 10.0.3.227/32,10.0.1.8/32
newaliases_path = /usr/local/sbin/newaliases
queue_directory = /var/spool/postfix_daviddenny.co.uk
readme_directory = /usr/local/share/doc/postfix/readme
relay_domains = daviddenny.co.uk
relay_recipient_maps = hash:/etc/postfix_daviddenny.co.uk/relay_recipients
sample_directory = /etc/postfix
sendmail_path = /usr/local/sbin/sendmail
setgid_group = _postdrop
smtpd_banner = $myhostname ESMTP $mail_name daviddenny.co.uk AT grasberg
transport_maps = hash:/etc/postfix_daviddenny.co.uk/transport
unknown_local_recipient_reject_code = 550
virtual_alias_maps = hash:/etc/postfix_daviddenny.co.uk/virtual
#


begin:vcard
fn:David Denny
n:Denny;David
email;internet:reply...@daviddenny.co.uk
tel;cell:+44 (0) 7834 773 673
version:2.1
end:vcard



Re: Inbound Only postfix gateway on home network/server lab CORRECTED **

2009-04-03 Thread Noel Jones

David Denny wrote:

I am setting up an inbound postfix instance to run on a dmz host.

Its purpose is to accept mail only for specific relay_recipients and to
transport them to an internal postfix server.


OK, a standard relay_domain with valid recipients listed in 
relay_recipient_maps.




I have demonstrated proof of concept with this * but there is a tweak I
cannot easily figure out from the documentation after having tried a few
obvious options and reset them. Something basic is missing from my
understanding, correcting which would be appreciated.

Firstly I need to be sure that nothing entering this server will go out
to the internet.


relayhost = [ip.of.internal.gateway]



All traffic needs to go to the internal smtp box which maildrops stuff
into local unix accounts.

There is a third box running outbound postfix which is meant to receive
outbound mail from clients and have access (in the first place) to my
ISPs smarthost.

If this seems overengineered, sorry. But I am attempting to learn the
details and having things on separate boxes helps.

** Anyway, the issue I am tussling with is that mails destined FOR
internal hosts don't resolve locally and instead escape out to my ISP's
smarthost where they are picked up with an invalid domain and bounced. I
would like to stop this behaviour.

** Actually they don't go to the smarthost. Please see later

Which fragments of my various configuration files would be useful to
help diagnose this?

I observe that mails are escaping directly from this machine and not
going to the internal maildrop server nor to the outbound smtp box. In
fact, the inbound postfix service is attempting to resolve the internal
address as an Internet domain "Diagnostic-Code: X-Postfix; Host or
domain name not found. Name service error for name=x.y
type=: Host not found".


and a transport_maps entry to help postfix find this host if 
it's different from the relayhost.


# transport
x.y  relay:[ip.of.internal.host]


  -- Noel Jones


Re: Inbound Only postfix gateway on home network/server lab CORRECTED **

2009-04-03 Thread David Denny

Noel Jones wrote:

David Denny wrote:

I am setting up an inbound postfix instance to run on a dmz host.

Its purpose is to accept mail only for specific relay_recipients and to
transport them to an internal postfix server.


OK, a standard relay_domain with valid recipients listed in 
relay_recipient_maps.




I have demonstrated proof of concept with this * but there is a tweak I
cannot easily figure out from the documentation after having tried a few
obvious options and reset them. Something basic is missing from my
understanding, correcting which would be appreciated.

Firstly I need to be sure that nothing entering this server will go out
to the internet.


relayhost = [ip.of.internal.gateway]



All traffic needs to go to the internal smtp box which maildrops stuff
into local unix accounts.

There is a third box running outbound postfix which is meant to receive
outbound mail from clients and have access (in the first place) to my
ISPs smarthost.

If this seems overengineered, sorry. But I am attempting to learn the
details and having things on separate boxes helps.

** Anyway, the issue I am tussling with is that mails destined FOR
internal hosts don't resolve locally and instead escape out to my ISP's
smarthost where they are picked up with an invalid domain and bounced. I
would like to stop this behaviour.

** Actually they don't go to the smarthost. Please see later

Which fragments of my various configuration files would be useful to
help diagnose this?

I observe that mails are escaping directly from this machine and not
going to the internal maildrop server nor to the outbound smtp box. In
fact, the inbound postfix service is attempting to resolve the internal
address as an Internet domain "Diagnostic-Code: X-Postfix; Host or
domain name not found. Name service error for name=x.y
type=: Host not found".


and a transport_maps entry to help postfix find this host if it's 
different from the relayhost.


# transport
x.y  relay:[ip.of.internal.host]


  -- Noel Jones


Thanks Noel. I added the relayhost and transport entries.
If I mail to da...@[i.p.add.ress] it reaches the internal destination.
If I mail to da...@. it goes out to the internet
So looks like a DNS issue.
I copied /etc/hosts into the chroot directory /var/spool/postfix but 
that had no beneficial effect.
Stumped... will continue with google unless or until someone else gets 
here first.

Cheers
DD

begin:vcard
fn:David Denny
n:Denny;David
email;internet:reply...@daviddenny.co.uk
tel;cell:+44 (0) 7834 773 673
version:2.1
end:vcard



Re: Inbound Only postfix gateway on home network/server lab CORRECTED **

2009-04-03 Thread Noel Jones

David Denny wrote:

Noel Jones wrote:
and a transport_maps entry to help postfix find this host if it's 
different from the relayhost.


# transport
x.y  relay:[ip.of.internal.host]


  -- Noel Jones


Thanks Noel. I added the relayhost and transport entries.
If I mail to da...@[i.p.add.ress] it reaches the internal destination.
If I mail to da...@. it goes out to the internet
So looks like a DNS issue.
I copied /etc/hosts into the chroot directory /var/spool/postfix but 
that had no beneficial effect.
Stumped... will continue with google unless or until someone else gets 
here first.

Cheers
DD



If postfix is trying to send to the internet directly, your 
relayhost setting didn't take.

http://www.postfix.org/postconf.5.html#relayhost

If postfix can't find where to send mail for ., likely 
your transport_maps entry is incorrect.
Note the lookup key in transport is the email domain, not 
necessarily the hostname.

http://www.postfix.org/postconf.5.html#transport_maps
http://www.postfix.org/transport.5.html

  -- Noel Jones


header_checks doesn't work (postfix 2.5.5 on debian lenny)

2009-04-03 Thread sosogh
Hi list

I am using postfix 2.5.5 on debian lenny.I installed it via apt-get 

I have set up two postfix smtpd instances, the first one listens on 0.0.0.0:25
the second one listens on 127.0.0.1:10026

The postfix:25 accepts mails from the INTERNET,checks that if the recipient is 
"@special.com",
if so, it forwards the mail to postfix:10026,and do header_checks on 
postfix:10026

This is my conf:

[r...@postfix]# more /etc/postfix/main.cf
smtpd_recipient_restrictions =
  permit_mynetworks,
  check_recipient_access pcre:/etc/postfix/recipient_access.txt,
  permit_sasl_authenticated,
  reject_non_fqdn_hostname,
  reject_non_fqdn_sender,
  reject_non_fqdn_recipient,
  reject_unauth_destination,
  reject_unauth_pipelining,
  reject_invalid_hostname,
  check_policy_service inet:127.0.0.1:6


[r...@postfix]# more recipient_access.txt 
/special.com/   FILTER smtp:[127.0.0.1]:10026 



[r...@postfix]# more master.cf 
127.0.0.1:10026 inet n  -   n   --  smtpd
-o header_checks=pcre:/etc/postfix/header_checks.txt
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8
-o receive_override_options=no_unknown_recipient_checks


[r...@postfix]# more header_checks.txt
/Subject:(.*)/  REPLACE Subject:[haha] $1

The problem is that header_checks doesn't work on postfix:10026,
the mail subject wasn't modified.
Any hints is appreciated 

This is the log:
Apr  4 00:19:40 debian postfix/smtpd[8195]: connect from unknown[199.178.143.21]
Apr  4 00:19:41 debian postfix/smtpd[8195]: NOQUEUE: filter: RCPT from 
unknown[199.178.143.21]: : Recipient address triggers 
FILTER smtp:[127.0.0.1]:10026; from= 
to= proto=ESMTP helo=<20090131-1825>
Apr  4 00:19:41 debian postfix/smtpd[8195]: 164831E0C0: 
client=unknown[199.178.143.21], sasl_method=LOGIN, 
sasl_username=sos...@sosogh.com
Apr  4 00:19:41 debian postfix/cleanup[8200]: 164831E0C0: 
message-id=<200904040019243122...@sosogh.com>
Apr  4 00:19:41 debian postfix/qmgr[8169]: 164831E0C0: 
from=, size=740, nrcpt=1 (queue active)
Apr  4 00:19:41 debian postfix/smtpd[8202]: connect from localhost[127.0.0.1]
Apr  4 00:19:41 debian postfix/smtpd[8202]: 9A9B91E0C2: 
client=localhost[127.0.0.1]
Apr  4 00:19:41 debian postfix/cleanup[8200]: 9A9B91E0C2: 
message-id=<200904040019243122...@sosogh.com>
Apr  4 00:19:41 debian postfix/smtpd[8195]: disconnect from 
unknown[199.178.143.21]
Apr  4 00:19:41 debian postfix/smtpd[8202]: disconnect from localhost[127.0.0.1]
Apr  4 00:19:41 debian postfix/qmgr[8169]: 9A9B91E0C2: 
from=, size=927, nrcpt=1 (queue active)
Apr  4 00:19:41 debian postfix/smtp[8201]: 164831E0C0: 
to=, relay=127.0.0.1[127.0.0.1]:10026, delay=0.7, 
delays=0.58/0/0/0.12, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 
9A9B91E0C2)
Apr  4 00:19:41 debian postfix/qmgr[8169]: 164831E0C0: removed
Apr  4 00:19:41 debian postfix/smtp[8203]: 9A9B91E0C2: 
to=, relay=mail.special.com[55.68.5.1]:25, delay=0.17, 
delays=0.11/0.01/0.03/0.03, dsn=2.0.0, status=sent (250 Mail OK queued as 
AQAAfx+AsAHMNNZJqTa9Cg==.24149S2)


Thank you



--
sosogh
2009-04-04




duplicate emails using always_bcc and amavisd-new

2009-04-03 Thread Bernard Higonnet
Hello,

I have my own little family mail server running postfix under FreeBSD
7.1-RELEASE #0.

I keep a journal of all ingoing and outgoing mail using always_bcc
which I'm happy with.

I recently installed amavisd-new and ever since I get duplicate emails
in the journal, apparently because when the mail is re-injected by
amavisd-new it goes through always_bcc again. I have tried setting
always_bcc to "" in master.cf, but that didn't work.

Can someone tell me how to do this?

TIA
Bernard Higonnet


Re: header_checks doesn't work (postfix 2.5.5 on debian lenny)

2009-04-03 Thread Noel Jones

sosogh wrote:

Hi list

I am using postfix 2.5.5 on debian lenny.I installed it via apt-get 


I have set up two postfix smtpd instances, the first one listens on 0.0.0.0:25
the second one listens on 127.0.0.1:10026

The postfix:25 accepts mails from the INTERNET,checks that if the recipient is 
"@special.com",
if so, it forwards the mail to postfix:10026,and do header_checks on 
postfix:10026

This is my conf:

[r...@postfix]# more /etc/postfix/main.cf
smtpd_recipient_restrictions =
  permit_mynetworks,
  check_recipient_access pcre:/etc/postfix/recipient_access.txt,
  permit_sasl_authenticated,
  reject_non_fqdn_hostname,
  reject_non_fqdn_sender,
  reject_non_fqdn_recipient,
  reject_unauth_destination,
  reject_unauth_pipelining,
  reject_invalid_hostname,
  check_policy_service inet:127.0.0.1:6


[r...@postfix]# more recipient_access.txt 
/special.com/   FILTER smtp:[127.0.0.1]:10026 




[r...@postfix]# more master.cf 
127.0.0.1:10026 inet n  -   n   --  smtpd

-o header_checks=pcre:/etc/postfix/header_checks.txt
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8
-o receive_override_options=no_unknown_recipient_checks


[r...@postfix]# more header_checks.txt
/Subject:(.*)/  REPLACE Subject:[haha] $1

The problem is that header_checks doesn't work on postfix:10026,
the mail subject wasn't modified.
Any hints is appreciated 


"header_checks doesn't work" is a poor subject choice.

the header_checks parameter is used by the cleanup service, 
and not by smtpd.  To specify alternate header_checks, you 
need to define an alternate cleanup service, then tell your 
alternate smtpd to use that.


Examples are in the archives.

  -- Noel Jones


Re: duplicate emails using always_bcc and amavisd-new

2009-04-03 Thread Noel Jones

Bernard Higonnet wrote:

Hello,

I have my own little family mail server running postfix under FreeBSD
7.1-RELEASE #0.

I keep a journal of all ingoing and outgoing mail using always_bcc
which I'm happy with.

I recently installed amavisd-new and ever since I get duplicate emails
in the journal, apparently because when the mail is re-injected by
amavisd-new it goes through always_bcc again. I have tried setting
always_bcc to "" in master.cf, but that didn't work.

Can someone tell me how to do this?

TIA
Bernard Higonnet


Disable recipient rewriting either before or after the 
content_filter with

http://www.postfix.org/postconf.5.html#receive_override_options

Typically, add to your master.cf :10026 ... smtpd entry: 
-receive_override_options=no_unknown_recipient_checks,no_address_mappings,no_header_body_checks

(note no spaces in the above)


  -- Noel Jones


Re: Inbound Only postfix gateway on home network/server lab CORRECTED **

2009-04-03 Thread David Denny

Noel Jones wrote:

David Denny wrote:

Noel Jones wrote:
and a transport_maps entry to help postfix find this host if it's 
different from the relayhost.


# transport
x.y  relay:[ip.of.internal.host]


  -- Noel Jones


Thanks Noel. I added the relayhost and transport entries.
If I mail to da...@[i.p.add.ress] it reaches the internal destination.
If I mail to da...@. it goes out to the internet
So looks like a DNS issue.
I copied /etc/hosts into the chroot directory /var/spool/postfix but 
that had no beneficial effect.
Stumped... will continue with google unless or until someone else 
gets here first.

Cheers
DD



If postfix is trying to send to the internet directly, your relayhost 
setting didn't take.

http://www.postfix.org/postconf.5.html#relayhost

If postfix can't find where to send mail for ., likely your 
transport_maps entry is incorrect.
Note the lookup key in transport is the email domain, not necessarily 
the hostname.

http://www.postfix.org/postconf.5.html#transport_maps
http://www.postfix.org/transport.5.html

  -- Noel Jones

Thanks Noel.
relayhost=[i.p.add.ress]
now works

Cheers
DD
begin:vcard
fn:David Denny
n:Denny;David
email;internet:reply...@daviddenny.co.uk
tel;cell:+44 (0) 7834 773 673
version:2.1
end:vcard



Re: duplicate emails using always_bcc and amavisd-new

2009-04-03 Thread Bernard Higonnet
Well I already had those in there. Is there a "no_always_bcc" ?

Thanks
Bernard Higonnet

On Fri, Apr 3, 2009 at 7:11 PM, Noel Jones  wrote:
> Bernard Higonnet wrote:
>>
>> Hello,
>>
>> I have my own little family mail server running postfix under FreeBSD
>> 7.1-RELEASE #0.
>>
>> I keep a journal of all ingoing and outgoing mail using always_bcc
>> which I'm happy with.
>>
>> I recently installed amavisd-new and ever since I get duplicate emails
>> in the journal, apparently because when the mail is re-injected by
>> amavisd-new it goes through always_bcc again. I have tried setting
>> always_bcc to "" in master.cf, but that didn't work.
>>
>> Can someone tell me how to do this?
>>
>> TIA
>> Bernard Higonnet
>
> Disable recipient rewriting either before or after the content_filter with
> http://www.postfix.org/postconf.5.html#receive_override_options
>
> Typically, add to your master.cf :10026 ... smtpd entry:
> -receive_override_options=no_unknown_recipient_checks,no_address_mappings,no_header_body_checks
> (note no spaces in the above)
>
>
>  -- Noel Jones
>


Re: duplicate emails using always_bcc and amavisd-new

2009-04-03 Thread Noel Jones

Bernard Higonnet wrote:

Well I already had those in there. Is there a "no_always_bcc" ?

Thanks
Bernard Higonnet



Please don't top post.

The "no_address_mappings" includes always_bcc.

Please show output of "postconf mail_version",
"postconf -n", and your modifications to master.cf

  -- Noel Jones


Change FROM in LOGS when e-mails come from APACHE

2009-04-03 Thread Claudio Frydlewsky









Hi, 

I have a web server running APACHE + PHP + POSTFIX with Virtual Servers.

I need to be able to see where the e-mails come from inside the logs.

The problem is that when i look into the postix logs i see this:

Apr  2 17:58:14 server1 postfix/pickup[14329]: 4519D85C0B: uid=48 from=
Apr  2 17:58:14 server1 postfix/cleanup[14278]: 4519D85C0B: 
message-id=<20090402215814.4519d85...@myserver.net>
Apr  2 17:58:14 server1 postfix/qmgr[31752]: 4519D85C0B: 
from=, size=922, nrcpt=1 (queue active)
Apr  2 17:58:14 server1 postfix/qmgr[31752]: 4519D85C0B: to=, 
relay=none, delay=0, status=deferred (delivery temporarily suspended: lost 
connection with mx1.hotmail.com[65.55.37.88] while sending RCPT TO)

I would like to know why I can't see the real mail from address in the logs.

Can anybody help me with this?

Thanks





check out the rest of the Windows Live™.
More than mail–Windows Live™ goes way beyond your inbox.
 More than messages
Invite your mail contacts to join your friends list with Windows Live Spaces. 
It's easy! Try it!
_
News, entertainment and everything you care about at Live.com. Get it now!
http://www.live.com/getstarted.aspx

Re: Change FROM in LOGS when e-mails come from APACHE

2009-04-03 Thread bem
On Fri, 3 Apr 2009 23:07:21 +
Claudio Frydlewsky  wrote:

> I need to be able to see where the e-mails come from inside the logs.

They are there.
> Apr 2 17:58:14 server1 postfix/qmgr[31752]: 4519D85C0B:
> from=, size=922, nrcpt=1 (queue active)

> I would like to know why I can't see the real mail from address in
> the logs.

You can.  The real from is the SMTP from.  Change your software to set
the SMTP from correctly.

(Ie, you most likely are asking: "Why does postfix not log the header
From:"?  And the answer is, "It normally does not log any headers...
why would it?")



Re: Change FROM in LOGS when e-mails come from APACHE

2009-04-03 Thread Corey Chandler

Claudio Frydlewsky wrote:


Hi,

I have a web server running APACHE + PHP + POSTFIX with Virtual Servers.

I need to be able to see where the e-mails come from inside the logs.



We do something similar here.

I lost the architectural battle to do things correctly, so instead on my 
mailgate I have /etc/postfix/canonical set to:


/^apa...@*/  u...@example.com

Obviously this is a regular expression; just as obviously this matches 
all apache users from any box; you'll need to segregate it from the 
inbound mail stream.


--
Corey Chandler / KB1JWQ
Living Legend / Systems Exorcist
Today's Excuse: Firmware update in the coffee machine



Re: Change FROM in LOGS when e-mails come from APACHE

2009-04-03 Thread Wietse Venema
Claudio Frydlewsky:
> Hi,
>
> I have a web server running APACHE + PHP + POSTFIX with Virtual Servers.
>
> I need to be able to see where the e-mails come from inside the logs.
>
> The problem is that when i look into the postix logs i see this:
>
> Apr  2 17:58:14 server1 postfix/pickup[14329]: 4519D85C0B: uid=48 
> from=
> Apr  2 17:58:14 server1 postfix/cleanup[14278]: 4519D85C0B: 
> message-id=<20090402215814.4519d85...@myserver.net>
> Apr  2 17:58:14 server1 postfix/qmgr[31752]: 4519D85C0B: 
> from=, size=922, nrcpt=1 (queue active)
> Apr  2 17:58:14 server1 postfix/qmgr[31752]: 4519D85C0B: 
> to=, relay=none, delay=0, status=deferred (delivery 
> temporarily suspended: lost connection with mx1.hotmail.com[65.55.37.88] 
> while sending RCPT TO)
>
> I would like to know why I can't see the real mail from address in the logs.
>
> Can anybody help me with this?

Configure PHP and replace:

/usr/sbin/sendmail -f senderaddress other arguments...

by:

/usr/sbin/sendmail other arguments...

The -f option overrides the default sender address apa...@myserver.net

Wietse


not receiveing bounce backs when using postfix

2009-04-03 Thread nrapp
Hello all,



I have a real head scratcher.



When sending email directly thru exchange  to a known bad address, say
sadfxs...@yahoo.com, I receive a bounce back, as I should, stating an invalid
address.



When I send the same email thru the same exchange server, this time with a
postfix smarthost, I never receive a bounce back.



Here is the mail flow:

Client---àExchange-àPostfix-àInternet.

Postfix is only configured for outbound email, exchange answers inbound
email.



Any suggestions? I don't know where else to look.  I suspect that I
configured postfix to be non-compliant to an RFC, but not sure what is the
offending configuration.



Any help is greatly appreciated.



Nick



Re: Change FROM in LOGS when e-mails come from APACHE

2009-04-03 Thread Wietse Venema
Wietse Venema:
> Claudio Frydlewsky:
> > Hi,
> >
> > I have a web server running APACHE + PHP + POSTFIX with Virtual Servers.
> >
> > I need to be able to see where the e-mails come from inside the logs.
> >
> > The problem is that when i look into the postix logs i see this:
> >
> > Apr  2 17:58:14 server1 postfix/pickup[14329]: 4519D85C0B: uid=48 
> > from=
> > Apr  2 17:58:14 server1 postfix/cleanup[14278]: 4519D85C0B: 
> > message-id=<20090402215814.4519d85...@myserver.net>
> > Apr  2 17:58:14 server1 postfix/qmgr[31752]: 4519D85C0B: 
> > from=, size=922, nrcpt=1 (queue active)
> > Apr  2 17:58:14 server1 postfix/qmgr[31752]: 4519D85C0B: 
> > to=, relay=none, delay=0, status=deferred (delivery 
> > temporarily suspended: lost connection with mx1.hotmail.com[65.55.37.88] 
> > while sending RCPT TO)
> >
> > I would like to know why I can't see the real mail from address in the logs.
> >
> > Can anybody help me with this?
> 
> Configure PHP and replace:
> 
> /usr/sbin/sendmail -f senderaddress other arguments...
> 
> by:
> 
> /usr/sbin/sendmail other arguments...
> 
> The -f option overrides the default sender address apa...@myserver.net

Um, that should be the other way around:

Replace: /usr/sbin/sendmail other arguments...

by: /usr/sbin/sendmail -f senderaddress other arguments...

Wietse


Re: not receiveing bounce backs when using postfix

2009-04-03 Thread Wietse Venema
nr...@firstfinancial.org:
> Any suggestions? I don't know where else to look.  I suspect that I
> configured postfix to be non-compliant to an RFC, but not sure what is the
> offending configuration.

Postfix logs all failed and successful deliveries to a logfile.
The file is usually called /var/log/maillog or /var/log/mail; the
exact pathname is usually defined in the /etc/syslog.conf file.

Wietse


RE: not receiveing bounce backs when using postfix

2009-04-03 Thread nrapp
Hi Wieste,

That is another issue I am having. 

The issue with no bounce backs has been ongoing for a short while and
yesterday, coincidentally I tried rotating the log file which was successful
but I have but been able to restart the logging. This bounce problem all came
to a head today and I have not been able to fix logging.

 

-Original Message-
From: owner-postfix-us...@postfix.org
[mailto:owner-postfix-us...@postfix.org] On Behalf Of Wietse Venema
Sent: Friday, April 03, 2009 10:57 PM
To: Postfix users
Subject: Re: not receiveing bounce backs when using postfix

nr...@firstfinancial.org:
> Any suggestions? I don't know where else to look.  I suspect that I
> configured postfix to be non-compliant to an RFC, but not sure what is the
> offending configuration.

Postfix logs all failed and successful deliveries to a logfile.
The file is usually called /var/log/maillog or /var/log/mail; the
exact pathname is usually defined in the /etc/syslog.conf file.

Wietse


RE: not receiveing bounce backs when using postfix

2009-04-03 Thread nrapp
Thanks for the fast reply.

I fixed the logging issue.

>From the /var/log/maillog

Apr  3 23:32:11 mail postfix/smtp[6451]: 96B0EB8: to=,
relay=b.mx.mail.yahoo.com[66.196.97.250]:25, delay=0.38,
delays=0.28/0.01/0.05/0.04, dsn=5.0.0, status=bounced (host
b.mx.mail.yahoo.com[66.196.97.250] said: 554 delivery error: dd This user
doesn't have a yahoo.com account (df...@yahoo.com) [-5] -
mta241.mail.re3.yahoo.com (in reply to end of DATA command))
Apr  3 23:32:11 mail postfix/cleanup[7281]: 2ACDFBA:
message-id=<20090404033211.2acd...@mail.firstfinancial.org>
Apr  3 23:32:11 mail postfix/bounce[31334]: 96B0EB8: sender non-delivery
notification: 2ACDFBA
/
Any suggestions?  Should postfix be configured to send this info to exchange?
Is the problem postfix not sending to exchange? 

Thanks,
nick

-Original Message-
From: owner-postfix-us...@postfix.org
[mailto:owner-postfix-us...@postfix.org] On Behalf Of Wietse Venema
Sent: Friday, April 03, 2009 10:57 PM
To: Postfix users
Subject: Re: not receiveing bounce backs when using postfix

nr...@firstfinancial.org:
> Any suggestions? I don't know where else to look.  I suspect that I
> configured postfix to be non-compliant to an RFC, but not sure what is the
> offending configuration.

Postfix logs all failed and successful deliveries to a logfile.
The file is usually called /var/log/maillog or /var/log/mail; the
exact pathname is usually defined in the /etc/syslog.conf file.

Wietse


Exception to sender address restrictions

2009-04-03 Thread Jason Bailey, Sun Advocate Webmaster
Hello all,

I have postfix working pretty well... efficiently blocking a very large
amount of spam (very happy with Postfix). But I have a problem...
Postfix isn't receiving mail from a specific mail system, and it's
critical that it does.

The problem really isn't Postfix. Postfix is doing exactly what it is
supposed to do. The mail system in question doesn't always report with
the same hostname (it's a web server that sends notification emails, but
does not receive email), which means HELO communication and email
addresses are seen as bogus. I'm trying to get them to change their
setup, but in the mean time, I'm losing email messages that I
desperately need. So I'm trying to find a temporary workaround.

Example:
Apr  3 22:52:06 fs2 postfix/smtpd[32221]: NOQUEUE: reject: RCPT from
unknown[x.x.x.x]: 450 : Sender address
rejected: Domain not found; from=
to= proto=ESMTP helo=<212453-app4.domain.com>

To be clear, domain.com exists, but 212453-app4.domain.com does not. It
contains no host (A) or mail exchanger (MX) record. The IP addresses
vary as well (I saw no consistent correlation between the hostname and
IP address).

In just a few portions of my mail log I see the following hostnames:
212453-app4.domain.com
207113-app1.domain.com
205107-app3.domain.com
207186-app2.domain.com

I know, it's goofy...

Now, as you can see, my server isn't letting them through (as one would
expect). But I need them to be. But I don't want to disable the checks
for all mail just so I can receive mail from this remote system. So, my
question is... is there a way to let mail from this domain through
without turning off the checks (smtpd_sender_restrictions, for example)
completely?

I tried setting up a pcre lookup table early in the sender restrictions
list, but it didn't seem to work (with an "OK" action). Either I did
something wrong, or I don't entirely understand how Postfix behaves.

Do any of you have any suggestions short of rejecting mail from this
mail system?


Re: Exception to sender address restrictions

2009-04-03 Thread Victor Duchovni
On Fri, Apr 03, 2009 at 11:45:17PM -0600, Jason Bailey, Sun Advocate Webmaster 
wrote:

> In just a few portions of my mail log I see the following hostnames:
> 212453-app4.domain.com
> 207113-app1.domain.com
> 205107-app3.domain.com
> 207186-app2.domain.com
> 

This assumes you have PCRE tables, adjusting to ordinary regexps is not
difficult:

unknown_sender_domain.pcre:
/^\d+-app\d\.example\.com$/ DUNNO
/^/ reject_unknown_sender_domain

main.cf:
smtpd_restriction_classes =
reject_most_unknown_sender_domains

pcre = pcre:${config_directory}/
reject_most_unknown_sender_domains =
check_sender_access ${pcre}unknown_sender_domain.pcre

smtpd_recipient_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_unauth_destination,
reject_most_unknown_sender_domains,
...

The more selective "restriction class" can be used safely anywhere you
can safely use the underlying "reject_unknown_sender_domain". You can
adjust the exception pattern or add more exceptions.

-- 
Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:


If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.