08-28-2008 08:33 AM
HI,
I need to write filter which will insert header in each mail as,
x-job:domain name of sender
e.g if from is homesh.joshi@logix.in
then x-job should be logix.in
by doing this my delivery MTA software will be able to tell me no of mails in queue from logix.in.
We are ISP hene it is very important to know this.
thanks in advance.
regards,
Homesh
08-28-2008 10:12 PM
HI,
I need to write filter which will insert header in each mail as,
x-job:domain name of sender
e.g if from is homesh.joshi@logix.in
then x-job should be logix.in
by doing this my delivery MTA software will be able to tell me no of mails in queue from logix.in.
We are ISP hene it is very important to know this.
thanks in advance.
regards,
Homesh
08-30-2008 06:30 AM
HI,
I need to write filter which will insert header in each mail as,
x-job:domain name of sender
e.g if from is homesh.joshi@logix.in
then x-job should be logix.in
by doing this my delivery MTA software will be able to tell me no of mails in queue from logix.in.
We are ISP hene it is very important to know this.
thanks in advance.
regards,
Homesh
Dunno if there is a variable for the domain. I have not seen one, but you can use the $EnvelopeFrom variable maybe that will work for you.
if true {
insert-header ('X-JOB', '$EnvelopeFrom');
}
09-01-2008 06:18 PM
I think the previous poster is correct, I don' think there's a variable that points directly to the domain of the sender. It would be great if there was, but I don't think there's a variable called "$EnvelopeSenderDomain".
However, since you mention ldap queries, if you look up ldap queries in the AsyncOS Advanced User Guide, it discussion tokens you can use to parse the email address of the recipient. Maybe you can use this information to your benefit?
Tokens:
You can use the following tokens in your LDAP queries:
• {a} username@domainname
• {d} domainname
• {g} groupname
• {u} username
• {f} MAIL FROM: address
Note — The {f} token is valid in acceptance queries only.
For example, you might use the following query to accept mail for an Active Directory LDAP
server:
(|(mail={a})(proxyAddresses=smtp:{a}))
HI,
thanks for writing.
$EnvelopeFrom variable will return entire sender name e.g homesh.joshi@logix.in. I am interested in domain name because it will help me finding queue from that domain.
I know Domain variable is the key. But who knows if it exist in Ironport.
Another way of doing is ldap group query. like i will query ldap and will find out the sender belogs to which group and add the group name(which should be domain name in my open ldap) in x-job header. I not sure how to this even.
Regards,
Homesh.
09-04-2008 04:39 PM
One (untested) possibility.
A sequence of two message filters:
one:
if(true) {
insert-header("X-Job", "$EnvelopeSender");
}
two:
if(true) {
edit-header-text('X-Job', '^.*@', '');
}
05-14-2009 12:54 PM
For the record. The Message Filters do work.
J.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: