Reuti,

Thanks for the advice. You had sent me a similar tip a few years ago which I was working from (http://arc.liv.ac.uk/pipermail/gridengine-users/2009-April/024264.html), but I was still doing something wrong.

It turned out the secret sauce I needed to the recipient rewriting to work as I wanted it to was to use smtp_generic_maps to look up the addresses in LDAP.

smtp_generic_maps = ldap:/etc/postfix/ldap-aliases.cf

There were a few other things I think I was doing wrong, too, that I've fixed. I'm not primarily a mail admin, so I only really tinker with Postfix when I am setting up a new cluster every few years. Thanks for your help.

Thanks to Gavin, too.

Prentice

On 02/06/2014 05:17 PM, Reuti wrote:
Hi,

Am 06.02.2014 um 20:29 schrieb Prentice Bisbal:

I have a question about mail handling/addressing. I'm using OGS 6.2u5p2.

All the compute nodes in my cluster are on a private network in the domain 
'clustername'. The login host is has a network interface on this private 
network and the hostname 'login', so it's fqdn is 'login.clustername.' I'm 
using postfix for my MTA on all the nodes, LDAP so e-mail usernames can be 
mapped to e-mail addresses, so mail sent to my username should map to my e-mail 
address listed in LDAP which is of the form [email protected].  When I send 
mail as root to my username, it gets delivered correctly. However, when I use 
qsub with the switch '-m bea', I receive the mail message, but it shows that it 
was addressed to [email protected] instead of the correct address. 
I'm not a mail expert, but clearly the one of the To: headers (envelope or 
message, I forget which - I'm not normally a mail admin)  isn't being written 
correctly. This only happens through OGS. Can anyone give me advice on how to 
configure OGS or Postfix so when I look at message in my mail cli!
ent, it shows that the actual address it was sent to? I'm not an expert on 
postfix administration, but I can share my postfix config if that will help 
debug this.
There are several places where the sender or recipient could be mangled and it 
depends on how you transfer the email to the final destination (are the nodes 
able to send to the outside world in your cluster - or first to the server or 
login machine?). You can start with this on the nodes - adjust it to your setup:

$ cat /etc/postfix/recipient_canonical

/^(root|sgeadmin)@node[0-9][0-9]\.cluster$/     ${1}@server.foobar.de
/^(.*@)node[0-9][0-9]\.cluster$/                ${1}login.foobar.de
/^(.*@)(login|server).cluster$/             ${1}login.foobar.de

and a setting in main.cf:

recipient_canonical_maps = regexp:/etc/postfix/recipient_canonical

If you don't see any effect, it might be necessary to include the subnet of the nodes in 
"mynetworks" in main.cf as it tells postfix what is an external or a local mail 
and apply the mangling or not.


Also the sender needs to be adjusted often, as node04.cluster and alike won't 
be accepted by many MTAs on the way to the final destination.

-- Reuti



_______________________________________________
users mailing list
[email protected]
https://gridengine.org/mailman/listinfo/users

Reply via email to