Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to write a macro to get [this part]@somedomain.com?

Status
Not open for further replies.

ruttiger

Programmer
Nov 16, 2000
24
US
I'm trying to do virtual email hosting without the virtusertable file getting too crazy. So, i was goin to try setting up one directory for each incoming email domain, and have a .forward there that would redirect the email to the proper local user.

for example, i'd like blake@mydomain.com to come into the server, and first look for the .forward file here, as this:

/home/mail/mydomain.com/.forward.blake

the only thing i need to know is how to create my own macro to get the value of the email address before the @ (not including the real name of the person or comments, of course)...

the $u doesn't work, cause that's the value of the aliased linux user.

Any idea?
thanks in advance, this is killin me!
Blake
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top