Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

header showing senders domain name i.e part after @

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

Re: header showing senders domain name i.e part after @

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

New Member

Re: header showing senders domain name i.e part after @

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.

New Member

Re: header showing senders domain name i.e part after @

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.

New Member

Re: header showing senders domain name i.e part after @

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

New Member

Re: header showing senders domain name i.e part after @

For the record. The Message Filters do work.

J.

300
Views
0
Helpful
5
Replies
CreatePlease to create content