Re: Multi-Instance-Questions

2011-09-27 Thread Thomas Trepper
Hi Stan,

thanks a lot for your eMail und sorry for the inconvenience. Here is the
hundred feet back down big picture: :-)

Postfix 2.5 on ubuntu 8.04.4. One physical interface with two public IPs.

eth0 - 10.0.0.1 - needs relay (with auth) for abc.com, def.com, ghi.com
to myIp.dyndns.org
eth0 - 10.0.0.2 - needs relay (with auth) for * (all) to
wp180.webpack.hosteurope.de (runs later on localhost only, therefore no
open relay)

I currently have:

master.cf:
smtp  inet  n   -   -   -   -   smtpd  - uses
main.cf if think
127.0.0.1:25inet n  -   n   -   -   smtpd
-o content_filter=smtp:[wp180.webpack.hosteurope.de:25]
-o smtp_sasl_auth_enable=yes
-o smtp_sasl_password_maps=hash:/etc/postfix/sasl_gr_smarthost
-o relayhost=wp180.webpack.hosteurope.de:25

main.cf:
myhostname = mx0.mydomain.com
myorigin = $myhostname
mydestination =
relay_domains = hash:/etc/postfix/transport
relayhost = myIp.dnsalias.org
transport_maps = hash:/etc/postfix/transport
relay_recipient_maps = hash:/etc/postfix/valid_recipients
virtual_alias_maps = hash:/etc/postfix/virtual_recipients
##postmap hash:/etc/postfix/...

show_user_unknown_table_name = no
mailbox_command =
mailbox_size_limit = 0
inet_protocols = all
inet_interfaces = 10.0.0.1

parent_domain_matches_subdomains =
debug_peer_list,
smtpd_access_maps

smtpd_recipient_restrictions =
permit_mynetworks
reject_unauth_destination

smtpd_sender_restrictions = reject_unknown_sender_domain
unknown_address_reject_code = 554


Is this setup possible with postfix?

Thanks a lot in advance!

Thomas





 On 9/25/2011 7:25 AM, Thomas Trepper wrote:
 Hi Wietse,

 I tried your solution with the content-filter option and I have the
 following in master.cf:

 127.0.0.1:25inet n  -   n   -   -   smtpd
  -o content_filter=smtp:[wp180.webpack.hosteurope.de:25]

 No.  I believe you need this, just as Wietse told you:

 10.0.0.1:smtp inet  n   -   -   -   -   smtpd
   -o content_filter=smtp:[wp180.webpack.hosteurope.de]

 Delete all of the other overrides you put in there and give it a go.
 AIUI this creates a straight shot between mail arriving on 10.0.0.1 and
 wp180.webpack.hosteurope.de, so you don't need, nor want, any other
 overrides trying to muck this up.

 and in this file (/etc/postfix/sasl_gr_smarthost) you see

 wp180.webpack.hosteurope.deuser  password

 Now you throw a previously unmentioned fly in the ointment...

 Until now you had not mentioned you need auth to connect to the
 downstream hosts you're relaying to.  This is a very odd setup.

 Maybe you should back up a few hundred feet and give us the big picture
 of what exactly you're trying to accomplish here.

 --
 Stan





Re: Many to one address rewriting, exceptions exist.

2011-09-27 Thread Wietse Venema
Noel Jones:
 On 9/26/2011 3:12 PM, Wietse Venema wrote:
  Randy Ramsdell:
  /etc/postfix/virtual:
#f...@example.com  stays itself.
f...@example.com f...@example.com
 
#b...@example.com  goes elsewhere.
b...@example.com other@elsewhere
 
  /etc/postfix/virtual.pcre:
# Everything else goes to the mailsink.
/./  mails...@example.net
 
  ?
  
  Plus the portion of my example that you left out, and that lists
  the PCRE file last in the virtual_alias_maps settings.
  
  Wietse
 
 
 But don't we need an identity 1-1 mapping in the hash file for
 other@elsewhere so the pcre /./ catchall doesn't rewrite it also?

I suppose it does. No 1-1 mapping is needed for mails...@example.net.
(I started from an example that wild-carded @example.com not /./).

Wietse




smtp_bind_address dynamic

2011-09-27 Thread Antonio Tommasi
Hi to all,
i need to set smtp_bind_address dynamically with a query in mysql table but it 
dowesn't work.
Is it possible with another parameter? 
thanks

-- 
Ing. Antonio Tommasi
Area Informatica
Area Infrastrutture - Servizio Posta Elettronica
Università del Salento - Lecce

tel. 0832 297373-7302-7535
e-mail: antonio.tomm...@unisalento.it 








Messaggio automatico istituzionale del sistema non eliminabile e che non
interpreta necessariamente la volonta' del mittente:

Il futuro della Ricerca Scientifica ha bisogno del tuo aiuto.
Dona il  5 x mille all'Universita' del Salento - Codice Fiscale: 80008870752


Re: smtp_bind_address dynamic

2011-09-27 Thread Wietse Venema
Antonio Tommasi:
 Hi to all,
 i need to set smtp_bind_address dynamically with a query in mysql
 table but it dowesn't work.

The following may come as a surprise.  

The smtp_bind_address feature works exactly as documented at
http://www.postfix.org/postconf.5.html#smtp_bind_address.

 Is it possible with another parameter? 

See RELEASE_NOTES-2.7 (the Postfix 2.7 release notes). The
section titled sender reputation describes two approaches.

Wietse


Re: Many to one address rewriting, exceptions exist.

2011-09-27 Thread Randy Ramsdell

On 09/26/11 16:12, Wietse Venema wrote:

Randy Ramsdell:
[ Charset ISO-8859-1 unsupported, converting... ]

On 09/26/11 14:36, Noel Jones wrote:

On 9/26/2011 1:31 PM, Randy Ramsdell wrote:

On 09/26/11 14:18, Noel Jones wrote:

On 9/26/2011 1:00 PM, Randy Ramsdell wrote:

On 09/22/11 13:45, Randy Ramsdell wrote:

I cannot find the the way to grab all to's rewritten to go to a
single to:. We need to send all mail coming out of our QA
environment and send that to a single, probably, local address.
The list of senders will be in the thousands and so using a
catchall for these has to be configured.

We will also select a few to's where we send these off as normal.

No external to our network mail we need to be routed.

So far I read about transport maps and the address rewriting but
don't see a way or the best way to accomplish this.

Advice appreciated,
Randy Ramsdell

When virtual_alias_maps using two maps as suggested.

virtual_alias_maps =
   hash:/etc/postfix/virtual pcre:/etc/postfix/virtual.pcre

This has order correct ?i.e As in the maps are checked sequentially?



The maps are checked sequentially and recursively. Recursion stops
when the result is the same as the input key or not found.

For this application, you would need 1-1 identity mappings in the
hash file, and a catchall in the pcre.


 -- Noel Jones

r...@mail1-test.dfb.qa.vn:/etc/postfix # cat virtual
real@madeupdomain rramsdell@nonlocaldomain

need to add an identity mapping to the hash file:

rramsdell@nonlocaldomain   rramsdell@nonlocaldomain






r...@mail1-test.dfb.qa.vn:/etc/postfix # cat virtual.pcre
/./ itstaff


This per Wietse.

Debug :

Sep 26 13:54:43 mail1-test postfix/smtpd[6842]: maps_find:
virtual_alias_maps: hash:/etc/postfix/virtual(0,lock|fold_fix):
real@madeupdomain = rramsdell@nonlocaldomain

. . .

Sep 26 13:54:53 mail1-test postfix/local[6848]: C311517A7BF:
to=itst...@mail1.dfb.qa.vn, orig_to=real@madeupdomain,
relay=local, delay=19, delays=19/0/0/0.05, dsn=2.0.0, status=sent
(delivered to maildir)

This looks like it matches virtual and then applies the pcre virtual.



Yes, that's what recursion does.




-- Noel Jones

/etc/postfix/virtual:
   #f...@example.com  stays itself.
   f...@example.com f...@example.com

   #b...@example.com  goes elsewhere.
   b...@example.com other@elsewhere

/etc/postfix/virtual.pcre:
   # Everything else goes to the mailsink.
   /./  mails...@example.net

?

Plus the portion of my example that you left out, and that lists
the PCRE file last in the virtual_alias_maps settings.

Wietse

virtual_alias_maps =
hash:/etc/postfix/virtual pcre:/etc/postfix/virtual.pcre

Has been this way since I started with your example.




Re: redirect all except whitelisted ?

2011-09-27 Thread Robin Sinclair

that works fine - thanks . Ideally we wouldnt want the REDIRECT affecting all 
recipients on the message, but from the access() man page it looks as if this 
is a feature of REDIRECT so I guess we have to live with it ? - is there any 
way around this ? ( i.e. deliver a copy to the whitelisted recipients, plus a 
copy to the 'mailsink' address ) 


- Original Message - 
From: Robin Sinclair para...@360.com 
To: postfix users postfix-users@postfix.org 
Sent: Monday, 26 September, 2011 16:44:36 GMT +00:00 GMT Britain, Ireland, 
Portugal 
Subject: Re: redirect all except whitelisted ? 


thanks for the example Noel - that sounds promising, I shall give that a go. 
P.S. I appreciate your nitpick too - I had seen that the access() manpage 
states order isnt important so was confused by the previous suggestion. 


/^foo1@example\.org$/ dunno 
/^foo2@example\.org$/ dunno 
/./ REDIRECT b...@example.org 



Re: redirect all except whitelisted ?

2011-09-27 Thread Noel Jones
On 9/27/2011 8:12 AM, Robin Sinclair wrote:
 that works fine - thanks .  Ideally we wouldnt want the REDIRECT
 affecting all recipients on the message, but from the access() man
 page it looks as if this is a feature of REDIRECT so I guess we have
 to live with it ?  - is there any way around this ? ( i.e. deliver a
 copy to the whitelisted recipients, plus a copy to the 'mailsink'
 address )



Rather than an access map, you can use virtual_alias_maps as
discussed in the parallel thread Many to one address rewriting,
exceptions exist.

That allows delivery to the whitelisted users, all other recipients
rewritten to the mailsink.

  -- Noel Jones


Re: redirect all except whitelisted ?

2011-09-27 Thread Robin Sinclair
P.S Just noticed that Randy ramsdell's thread Many to one address rewriting, 
exceptions exist is pretty much the same question as I'm asking, I shall play 
around with that approach too : 
( virtual_alias_maps = hash:/etc/postfix/virtual pcre:/etc/postfix/virtual.pcre 

- Original Message - 
From: Robin Sinclair para...@360.com 
To: postfix users postfix-users@postfix.org 
Sent: Tuesday, 27 September, 2011 14:12:30 GMT +00:00 GMT Britain, Ireland, 
Portugal 
Subject: Re: redirect all except whitelisted ? 



that works fine - thanks . Ideally we wouldnt want the REDIRECT affecting all 
recipients on the message, but from the access() man page it looks as if this 
is a feature of REDIRECT so I guess we have to live with it ? - is there any 
way around this ? ( i.e. deliver a copy to the whitelisted recipients, plus a 
copy to the 'mailsink' address ) 


- Original Message - 
From: Robin Sinclair para...@360.com 
To: postfix users postfix-users@postfix.org 
Sent: Monday, 26 September, 2011 16:44:36 GMT +00:00 GMT Britain, Ireland, 
Portugal 
Subject: Re: redirect all except whitelisted ? 


thanks for the example Noel - that sounds promising, I shall give that a go. 
P.S. I appreciate your nitpick too - I had seen that the access() manpage 
states order isnt important so was confused by the previous suggestion. 


/^foo1@example\.org$/ dunno 
/^foo2@example\.org$/ dunno 
/./ REDIRECT b...@example.org 



Re: Many to one address rewriting, exceptions exist.

2011-09-27 Thread Noel Jones
On 9/27/2011 8:03 AM, Randy Ramsdell wrote:
 /etc/postfix/virtual:
#f...@example.com  stays itself.
f...@example.comf...@example.com

#b...@example.com  goes elsewhere.
b...@example.comother@elsewhere

 /etc/postfix/virtual.pcre:
# Everything else goes to the mailsink.
/./mails...@example.net

 ?
 Plus the portion of my example that you left out, and that lists
 the PCRE file last in the virtual_alias_maps settings.

 Wietse
 virtual_alias_maps =
 hash:/etc/postfix/virtual pcre:/etc/postfix/virtual.pcre
 
 Has been this way since I started with your example.
 
 


When you have a /./ catchall, you need an identity mapping in the
hash file for every user to keep the catchall from grabbing it.

In your example above, you would add
   other@elsewhere   other@elsewhere
to your hash file.

Wietse's examples started out with just aliasing @example.com and
not the whole world.  In the case of aliasing only @example.com, no
identity mapping would be needed for @elsewhere as it wouldn't match
the domain wildcard.  But you're using a global wildcard, not just a
domain wildcard.


  -- Noel Jones


Postscreen Blacklist

2011-09-27 Thread Marko Weber


Hello i created an etc/postfix/postscreen_access.cidr in my postfix 
dir.

now postscreen checks on connect for the entries.

i set one server in the list with reject

Is it right, that the test mail goes thru postfix?

i see in logs :

Sep 27 16:43:30 netcogw postfix/postscreen[15206]: CONNECT from 
[78.46.56.1xx]:31558
Sep 27 16:43:30 netcogw postfix/postscreen[15206]: BLACKLISTED 
[78.46.56.1xx]:31558
Sep 27 16:43:30 netcogw postfix/postscreen[15206]: PASS OLD 
[78.46.56.1xx]:31558



do i have to clear any special cache before to test if 78.46.56.1xx 
gets blocked?


marko



Re: Postscreen Blacklist

2011-09-27 Thread /dev/rob0
On Tuesday 27 September 2011 09:52:16 Marko Weber wrote:
 Hello i created an etc/postfix/postscreen_access.cidr in my postfix
 dir.
 now postscreen checks on connect for the entries.
 
 i set one server in the list with reject
 
 Is it right, that the test mail goes thru postfix?
 
 i see in logs :
 
 Sep 27 16:43:30 netcogw postfix/postscreen[15206]: CONNECT from
 [78.46.56.1xx]:31558
 Sep 27 16:43:30 netcogw postfix/postscreen[15206]: BLACKLISTED
 [78.46.56.1xx]:31558
 Sep 27 16:43:30 netcogw postfix/postscreen[15206]: PASS OLD
 [78.46.56.1xx]:31558
 
 
 do i have to clear any special cache before to test if 78.46.56.1xx
 gets blocked?

http://www.postfix.org/POSTSCREEN_README.html#perm_white_black
http://www.postfix.org/postconf.5.html#postscreen_blacklist_action

The latter says:
postscreen_blacklist_action (default: ignore)
-- 
Offlist mail to this address is discarded unless
/dev/rob0 or not-spam is in Subject: header


Re: Postscreen Blacklist

2011-09-27 Thread Marko Weber


Thanks rob0,

when i set

postscreen_blacklist_action = drop

all works like a charm.

marko, from sunny hamburg



Am 27.09.2011 17:08, schrieb /dev/rob0:

On Tuesday 27 September 2011 09:52:16 Marko Weber wrote:

Hello i created an etc/postfix/postscreen_access.cidr in my postfix
dir.
now postscreen checks on connect for the entries.

i set one server in the list with reject

Is it right, that the test mail goes thru postfix?

i see in logs :

Sep 27 16:43:30 netcogw postfix/postscreen[15206]: CONNECT from
[78.46.56.1xx]:31558
Sep 27 16:43:30 netcogw postfix/postscreen[15206]: BLACKLISTED
[78.46.56.1xx]:31558
Sep 27 16:43:30 netcogw postfix/postscreen[15206]: PASS OLD
[78.46.56.1xx]:31558


do i have to clear any special cache before to test if 78.46.56.1xx
gets blocked?


http://www.postfix.org/POSTSCREEN_README.html#perm_white_black
http://www.postfix.org/postconf.5.html#postscreen_blacklist_action

The latter says:
postscreen_blacklist_action (default: ignore)





automatic message

2011-09-27 Thread Amira Othman
Hi all,

 

I want to configure postfix to reply automatically for specific e-mail
address. I googled that but I found that I must have another software
(vacation) that handles this issue. I am using postfix-2.3.3-2.3.el5_6 and
using virtual domains. I am not using MySQL I use regular files for dovecot
authentication. Any suggestions about configuring automatic message using
postfix.

 

Regards



Re: Many to one address rewriting, exceptions exist.

2011-09-27 Thread Randy Ramsdell

On 09/27/11 09:33, Noel Jones wrote:

On 9/27/2011 8:03 AM, Randy Ramsdell wrote:

/etc/postfix/virtual:
#f...@example.com  stays itself.
f...@example.comf...@example.com

#b...@example.com  goes elsewhere.
b...@example.comother@elsewhere

/etc/postfix/virtual.pcre:
# Everything else goes to the mailsink.
/./mails...@example.net

?

Plus the portion of my example that you left out, and that lists
the PCRE file last in the virtual_alias_maps settings.

 Wietse

virtual_alias_maps =
 hash:/etc/postfix/virtual pcre:/etc/postfix/virtual.pcre

Has been this way since I started with your example.




When you have a /./ catchall, you need an identity mapping in the
hash file for every user to keep the catchall from grabbing it.

In your example above, you would add
other@elsewhere   other@elsewhere
to your hash file.

Wietse's examples started out with just aliasing @example.com and
not the whole world.  In the case of aliasing only @example.com, no
identity mapping would be needed for @elsewhere as it wouldn't match
the domain wildcard.  But you're using a global wildcard, not just a
domain wildcard.


   -- Noel Jones
Okay. Tried so many iterations of this also had another person try 
without success.


CONFIGS:

r...@mail1-test.dfb.qa.vn:/etc/postfix # cat virtual
r...@mail1.dfb.qa.vnrramsdell@elsewhere

r...@mail1-test.dfb.qa.vn:/etc/postfix # cat virtual.pcre
/rramsdell\@elsewhere/  rramsdell@elsewhere
/./ itstaff

r...@mail1-test.dfb.qa.vn:/etc/postfix # cat main.cf | grep virtual.pcre
virtual_alias_maps = hash:/etc/postfix/virtual 
pcre:/etc/postfix/virtual.pcre


TESTING

r...@mail1-test.dfb.qa.vn:/etc/postfix # telnet 192.168.21.31 25
Trying 192.168.21.31...
Connected to 192.168.21.31.
Escape character is '^]'.
220 mail1.dfb.qa.vn ESMTP Postfix
helo rramsdell
250 mail1.dfb.qa.vn
mail from: rramsd...@elsewhere.com
250 2.1.0 Ok
rcpt to: r...@mail1.dfb.qa.vn
250 2.1.5 Ok
data
354 End data with CRLF.CRLF
.
250 2.0.0 Ok: queued as 6252A17A809


RESULT

Sep 27 12:25:38 mail1-test postfix/smtpd[16575]: 6252A17A809: 
client=mail1-test.dfb.qa.vn[192.168.21.31]
Sep 27 12:25:42 mail1-test postfix/cleanup[16592]: 6252A17A809: 
message-id=20110927162538.6252a17a...@mail1.dfb.qa.vn
Sep 27 12:25:42 mail1-test postfix/qmgr[16563]: 6252A17A809: 
from=rramsdell@elsewhere, size=352, nrcpt=1 (queue active)
Sep 27 12:25:42 mail1-test postfix/error[16593]: 6252A17A809: 
to=rramsdell@elsewhere, orig_to=r...@mail1.dfb.qa.vn, relay=none, 
delay=25, delays=25/0/0/0.03, dsn=5.0.0, status=bounced (User unknown in 
virtual alias table)
Sep 27 12:25:42 mail1-test postfix/cleanup[16592]: A556C17A810: 
message-id=20110927162542.a556c17a...@mail1.dfb.qa.vn
Sep 27 12:25:42 mail1-test postfix/qmgr[16563]: A556C17A810: from=, 
size=2208, nrcpt=1 (queue active)
Sep 27 12:25:42 mail1-test postfix/bounce[16594]: 6252A17A809: sender 
non-delivery notification: A556C17A810

Sep 27 12:25:42 mail1-test postfix/qmgr[16563]: 6252A17A809: removed
Sep 27 12:25:42 mail1-test postfix/error[16593]: A556C17A810: 
to=rramsdell@elsewhere, relay=none, delay=0.06, delays=0.03/0/0/0.03, 
dsn=5.0.0, status=bounced (User unknown in virtual alias table)

Sep 27 12:25:42 mail1-test postfix/qmgr[16563]: A556C17A810: removed

POSTCONF

r...@mail1-test.dfb.qa.vn:/etc/postfix # postconf -n
biff = no
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter =
daemon_directory = /usr/lib/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
defer_transports =
delay_warning_time = 1h
disable_dns_lookups = no
disable_mime_output_conversion = no
home_mailbox = Maildir/
html_directory = /usr/share/doc/packages/postfix-doc/html
inet_interfaces = all
inet_protocols = all
mail_owner = postfix
mail_spool_directory = /var/mail
mailbox_command =
mailbox_size_limit = 0
mailbox_transport =
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
masquerade_classes = envelope_sender, header_sender, header_recipient
masquerade_domains =
masquerade_exceptions = root
message_size_limit = 0
message_strip_characters = \0
mydestination = $myhostname, localhost.$mydomain
myhostname = mail1.dfb.qa.vn
mynetworks = 192.168.21.0/24 127.0.0.0/8
mynetworks_style = subnet
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/packages/postfix-doc/README_FILES
relocated_maps = hash:/etc/postfix/relocated
sample_directory = /usr/share/doc/packages/postfix-doc/samples
sendmail_path = /usr/sbin/sendmail
setgid_group = maildrop
smtp_enforce_tls = no
smtp_sasl_auth_enable = no
smtp_use_tls = no
smtpd_client_restrictions =
smtpd_helo_required = no
smtpd_helo_restrictions =
smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination
smtpd_sasl_auth_enable = no
smtpd_sender_restrictions = hash:/etc/postfix/access
smtpd_use_tls = no
strict_8bitmime = no

Re: redirect all except whitelisted ?

2011-09-27 Thread Robin Sinclair


thanks - that did the trick :-) 
I was also able to whitelist whole domains using the parentheses/matching 
technique. 
Here's my final config, in case its useful for Randy or others: 

/etc/postfix/virtual : 
# 1. whitelisted individuals: 
r...@hotmail.com r...@hotmail.com 
# 2. whitelisted domains 
/(.*)@foobar.com$/ ${1}@foobar.com 

/etc/postfix/virtual.pcre : 
/./ mails...@example.com 

virtual_alias_maps = hash:/etc/postfix/virtual pcre:/etc/postfix/virtual.pcre 


Rather than an access map, you can use virtual_alias_maps as 
discussed in the parallel thread Many to one address rewriting, 
exceptions exist. 




Re: Many to one address rewriting, exceptions exist.

2011-09-27 Thread Wietse Venema
Randy Ramsdell:
 Sep 27 12:25:42 mail1-test postfix/error[16593]: 6252A17A809: 
 to=rramsdell@elsewhere, orig_to=r...@mail1.dfb.qa.vn, relay=none, 
 delay=25, delays=25/0/0/0.03, dsn=5.0.0, status=bounced (User unknown in 
 virtual alias table)

You need to override the virtual_alias_domains default setting.

/etc/postfix/main.cf:
virtual_alias_domains =

Otherwise, your /./ wildcard will match all domains.

virtual_alias_domains requires that the address is rewritten to a
different domain, otherwise it reports user unknown in virtual
alias table.

Wietse


Re: Multi-Instance-Questions

2011-09-27 Thread Fernando Maior
On Tue, Sep 27, 2011 at 6:29 AM, Thomas Trepper
thomas.trep...@blueclaim.com wrote:
 Hi Stan,

 thanks a lot for your eMail und sorry for the inconvenience. Here is the
 hundred feet back down big picture: :-)

 Postfix 2.5 on ubuntu 8.04.4. One physical interface with two public IPs.

 eth0 - 10.0.0.1 - needs relay (with auth) for abc.com, def.com, ghi.com
 to myIp.dyndns.org
 eth0 - 10.0.0.2 - needs relay (with auth) for * (all) to
 wp180.webpack.hosteurope.de (runs later on localhost only, therefore no
 open relay)

 I currently have:

 master.cf:
 smtp      inet  n       -       -       -       -       smtpd  - uses
 main.cf if think
 127.0.0.1:25    inet n  -       n       -       -       smtpd
    -o content_filter=smtp:[wp180.webpack.hosteurope.de:25]
    -o smtp_sasl_auth_enable=yes
    -o smtp_sasl_password_maps=hash:/etc/postfix/sasl_gr_smarthost
    -o relayhost=wp180.webpack.hosteurope.de:25

 main.cf:
 myhostname = mx0.mydomain.com
 myorigin = $myhostname
 mydestination =
 relay_domains = hash:/etc/postfix/transport
 relayhost = myIp.dnsalias.org
 transport_maps = hash:/etc/postfix/transport
 relay_recipient_maps = hash:/etc/postfix/valid_recipients
 virtual_alias_maps = hash:/etc/postfix/virtual_recipients
 ##postmap hash:/etc/postfix/...

 show_user_unknown_table_name = no
 mailbox_command =
 mailbox_size_limit = 0
 inet_protocols = all
 inet_interfaces = 10.0.0.1

 parent_domain_matches_subdomains =
        debug_peer_list,
        smtpd_access_maps

 smtpd_recipient_restrictions =
        permit_mynetworks
        reject_unauth_destination

 smtpd_sender_restrictions = reject_unknown_sender_domain
 unknown_address_reject_code = 554


 Is this setup possible with postfix?

 Thanks a lot in advance!

 Thomas





 On 9/25/2011 7:25 AM, Thomas Trepper wrote:
 Hi Wietse,

 I tried your solution with the content-filter option and I have the
 following in master.cf:

 127.0.0.1:25    inet n  -       n       -       -       smtpd
      -o content_filter=smtp:[wp180.webpack.hosteurope.de:25]

 No.  I believe you need this, just as Wietse told you:

 10.0.0.1:smtp     inet  n       -       -       -       -       smtpd
       -o content_filter=smtp:[wp180.webpack.hosteurope.de]

 Delete all of the other overrides you put in there and give it a go.
 AIUI this creates a straight shot between mail arriving on 10.0.0.1 and
 wp180.webpack.hosteurope.de, so you don't need, nor want, any other
 overrides trying to muck this up.

 and in this file (/etc/postfix/sasl_gr_smarthost) you see

 wp180.webpack.hosteurope.deuser  password

 Now you throw a previously unmentioned fly in the ointment...

 Until now you had not mentioned you need auth to connect to the
 downstream hosts you're relaying to.  This is a very odd setup.

 Maybe you should back up a few hundred feet and give us the big picture
 of what exactly you're trying to accomplish here.

 --
 Stan





Thomas,

I believe you should use the interface IP (10.0.0.1 or 10.0.0.2) instead of
127.0.0.1 in master.cf, as Stan told you before...

Fernando


Re: Multi-Instance-Questions

2011-09-27 Thread Stan Hoeppner

On 9/27/2011 4:29 AM, Thomas Trepper wrote:

Hi Stan,

thanks a lot for your eMail und sorry for the inconvenience. Here is the
hundred feet back down big picture: :-)


snip

That's not a big picture.  A big picture is something like this:

I need to drive my grandmother to the airport, but I don't know how to 
get there.  Can you provide some directions?


I'd like to have $400,000 in my 401k by the time I'm 45.  I'm 25 now. 
Can you advise me on the best investments to achieve this goal?


Maybe big picture doesn't translate in your native language...

--
Stan


Virtual Alias Table

2011-09-27 Thread Andy Jezierski
Hi,

Trying to add an entry to a virtual alias table and for some reason, I keep
getting an error stating the recipient can't be found.

lipidnutritxxx.com  DOMAIN
erik.bakk...@lipidnutritxxx.com erik.bakk...@stexxx.com

[snip]

#
# Temp forwarding for employees not recruited
#
louis.dede...@lipidnutritxxx.comlouis.dede...@croklxxx.com
leslye.mob...@lipidnutritxxx.comleslye.mob...@croklxxx.com-
This entry
postmas...@lipidnutritxxx.com   postmas...@stexxx.com


Sep 27 13:38:26 viper postfix/smtpd[3837]: NOQUEUE: reject: RCPT from
mail-wy0-f181.google.com[74.125.82.181]: 550 5.1.1 
leslye.mob...@lipidnutritxxx.com: Recipient address rejected: undeliverable
address: User unknown in virtual alias table; from=ajezier...@gmxxx.com
to=leslye.mob...@lipidnutritxxx.com proto=ESMTP helo=
mail-wy0-f181.google.com

Working fine for others in the table.

Sep 27 12:56:18 viper postfix/smtp[1424]: 5DBDA73077: to=
postmas...@stexxx.com, orig_to=postmas...@lipidnutritxxx.com,
relay=172.16.196.63[172.16.196.63]:25, delay=0.01, delays=0/0/0/0,
dsn=2.0.0, status=deliverable (250 postmas...@stexxx.com... Recipient OK)


I've done a postmap virtual  a postfix reload

Anyone see anything that I'm missing?  Running version 2.9-20110323

Thanks
Andy


Re: Virtual Alias Table

2011-09-27 Thread Wietse Venema
Andy Jezierski:
 address: User unknown in virtual alias table; from=ajezier...@gmxxx.com

This error message means that you need to have a virtual alias that
replaces the recipient by an address that is not in a virtual alias
domain.

Wietse


Re: Virtual Alias Table

2011-09-27 Thread Andy Jezierski
On Tue, Sep 27, 2011 at 2:35 PM, Wietse Venema wie...@porcupine.org wrote:
 Andy Jezierski:
 address: User unknown in virtual alias table; from=ajezier...@gmxxx.com

 This error message means that you need to have a virtual alias that
 replaces the recipient by an address that is not in a virtual alias
 domain.

        Wietse


Correct, that's what I'm trying to do.

louis.dede...@lipidnutrition.com
louis.dede...@croklaan.com   This entry works
leslye.mob...@lipidnutrition.com
leslye.mob...@croklaan.com  - This entry does not work

I sent a test message to both recipients, one is rejected, the second
is forwarded. But for some reason, this time the recipient address of
the undeliverable message is checked for validity at the destination
server.  But if I send a message to just the undeliverable user it is
not.


Sep 27 14:52:01 viper postfix/smtpd[5447]: connect from
mail-ww0-f47.google.com[74.125.82.47]
Sep 27 14:52:02 viper postfix/smtpd[5447]: 3F3B273051:
client=mail-ww0-f47.google.com[74.125.82.47]
Sep 27 14:52:02 viper postfix/smtpd[5447]: 3F3B273051: reject: RCPT
from mail-ww0-f47.google.com[74.125.82.47]: 550 5.1.1
leslye.mob...@lipidnutrition.com: Recipient address rejected:
undeliverable address: User unknown in virtual alias table;
from=ajezier...@gmail.com to=leslye.mob...@lipidnutrition.com
proto=ESMTP helo=mail-ww0-f47.google.com
Sep 27 14:52:02 viper postfix/cleanup[5358]: 3F3B273051:
message-id=CAC4UgmBG3igmJqD13eoBQLFyGBsnF-6LWJd+bUEuh=tzdo2...@mail.gmail.com
Sep 27 14:52:02 viper spamd[6316]: spamd: connection from localhost
[127.0.0.1] at port 48203
Sep 27 14:52:02 viper spamd[6316]: spamd: processing message
CAC4UgmBG3igmJqD13eoBQLFyGBsnF-6LWJd+bUEuh=tzdo2...@mail.gmail.com
for root:58
Sep 27 14:52:02 viper postfix/smtp[6898]: 5AE7973072:
to=leslye.mob...@croklaan.com,
orig_to=leslye.mob...@lipidnutrition.com,
relay=mail01.croklaan.com[213.31.33.163]:25, delay=0.58,
delays=0/0/0.34/0.24, dsn=2.0.0, status=deliverable (250
leslye.mob...@croklaan.com Recipient OK)
Sep 27 14:52:03 viper postfix/qmgr[4793]: 5AE7973072: removed
Sep 27 14:52:03 viper spamd[6316]: spamd: clean message (-4.4/5.0) for
root:58 in 0.8 seconds, 1423 bytes.
Sep 27 14:52:03 viper spamd[6316]: spamd: result: . -4 -
BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,T_TO_NO_BRKTS_FREEMAIL
scantime=0.8,size=1423,user=root,uid=58,required_score=5.0,rhost=localhost,raddr=127.0.0.1,rport=48203,mid=CAC4UgmBG3igmJqD13eoBQLFyGBsnF-6LWJd+bUEuh=tzdo2...@mail.gmail.com,bayes=0.00,autolearn=ham,shortcircuit=no
Sep 27 14:52:03 viper postfix/qmgr[4793]: 3F3B273051:
from=ajezier...@gmail.com, size=1361, nrcpt=1 (queue active)
Sep 27 14:52:03 viper postfix/smtpd[5447]: disconnect from
mail-ww0-f47.google.com[74.125.82.47]
Sep 27 14:52:03 viper spamd[75313]: prefork: child states: III
Sep 27 14:52:04 viper postfix/smtp[7370]: 3F3B273051:
to=louis.dede...@croklaan.com,
orig_to=louis.dede...@lipidnutrition.com,
relay=mail01.croklaan.com[213.31.33.163]:25, delay=2.4,
delays=1.5/0/0.38/0.5, dsn=2.0.0, status=sent (250 OK:
068590c03...@mail01.croklaan.com)
Sep 27 14:52:04 viper postfix/qmgr[4793]: 3F3B273051: removed


Re: Virtual Alias Table

2011-09-27 Thread Wietse Venema
Andy Jezierski:
 leslye.mob...@lipidnutrition.com: Recipient address rejected:
 undeliverable address: User unknown in virtual alias table;
 from=ajezier...@gmail.com to=leslye.mob...@lipidnutrition.com

This means that there is no rule that rewrites this recipient to an
address that is not in a virtual alias domain.

To debug tables, use the postmap command.

postmap -q u...@example.com your-virtual-alias-table

To dump (hash or btree) tables:

postmap -s your-virtual-alias-table

Wietse


postfix and/or amavisd-new duplicating sender_bcc's?

2011-09-27 Thread Troy Piggins
I'm using sender_bcc maps to archive/backup sent mail.  Config
extracts below.  It does work, but is creating duplicates when mail
is sent from clients other than localhost.  IE if I send mail using
mutt on the postfix server machine, no duplicate is created.  If
I send mail using Thunderbird on a workstation, there are duplicates
of all sent mail in the gzipped file (eg in ~/Sent_1109.gz).  There
is only one copy of the mail in Thunderbird's Sent folder, though.

The Thunderbird/iPhone clients connect using STARTTLS normal
password, mailbox format on server is Maildir with dovecot IMAP SSL
etc.

When I say they're duplicates, I mean that in every respect.  All
headers - Message-ID, dates and times, everything.

Any ideas or thoughts?  Not sure if it's to do with delivery,
authentication, or something else.  I can post more config extracts
if you need/ask.


/etc/postfix/main.cf:
...
sender_bcc_maps = pcre:/etc/postfix/sender_bcc_pcre
...

/etc/postfix/sender_bcc_pcre:
if !/^(archive.*|copier|fetchmail|root|.+_sent)@ourdomain\.com\.au$/
/^(.+)@ourdomain\.com\.au$/ ${1}_sent@netserv.ourdomain.local
endif

/etc/procmailrc:
...
:0:
* ^X-Original-To:.*_sent@netserv\.ourdomain\.local
| gzip -fc9  ${HOME}/Sent_${DATE}.gz
...


-- 
Troy Piggins


Re: postfix and/or amavisd-new duplicating sender_bcc's?

2011-09-27 Thread Wietse Venema
Troy Piggins:
 I'm using sender_bcc maps to archive/backup sent mail.  Config
 extracts below.  It does work, but is creating duplicates when mail
 is sent from clients other than localhost.  IE if I send mail using

See http://www.postfix.org/FILTER_README.html, and look for the
examples with receive_override_options. This workaround is needed
before or after the filter.

Wietse