cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1112
Views
0
Helpful
5
Replies

header showing senders domain name i.e part after @

homesh2009
Level 1
Level 1

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

5 Replies 5

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');
}

homesh2009
Level 1
Level 1

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');
}



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.

kluu_ironport
Level 2
Level 2

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.

meyd45_ironport
Level 1
Level 1

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', '^.*@', '');
}

meyd45_ironport
Level 1
Level 1

For the record. The Message Filters do work.

J.

Getting Started

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: