From: Jeff C. <je...@ul...> - 2003-04-30 17:52:33
|
jaigopal said: > Hello, > > The mail server on which i have configured Sqmail has many domains > and is running sendmail. > > Now the problem is say if there is a mail id in...@xy... and its > username is info and there is another domain on the server > called abc.com and even this needs a mail id in...@ab..., for this > mail id i cannot set info as the username info is given to > another mail id (in...@xy...). So for this mail id (in...@ab...) i > set a username like abcinfo. Now when i logon with > abcinfo and send a mail to someone using Sqmail, the receiver of the > mail gets the sender address as ab...@ab... > whereas it should be in...@ab.... > > The reason for this problem i feel is that Sqmail takes the login > name as the email id. > > I guess my problem can be fixed if i can add another field at the > login promtp called " Email ID " and make compose code to > take data in this field as the sender's email address instead of the > username. I tried doing this, but i am not good at PHP and it > was too much for me. > > Can anyone help me ? > Hope i could express my problem. Hi. I just recently joined this list, like a week or two ago, and this is my first post. So, hello. There's a couple ways around your problem. First of all, SquirrelMail is defaulting to sending as <login>@domain because it has not been told otherwise. I recently installed the askuserinfo plugin so new users will be asked to enter their email address. I have a similar situation to you, where users' logins are different from their email addresses. Another approach is using the genericstable feature of sendmail. I assume you are creating the multiple users with the same username portion of the address using the virtusertable. For example, if you had the following entries in virtusertable: in...@ab... infoabc in...@xy... infoxyz You could simply reverse this and use it in your genericstable: infoabc in...@ab... infoxyz in...@xy... This will cause sendmail to rewrite the outbound sender address. You could convert your virtusertable to a genericstable with a simple awk command. awk '{print $2"\t"$1}' virtusertable > genericstable That is assuming of course that you don't have any accounts listed more than once in virtusertable. If that were the case, you might need to resort to something like Perl. Hmm... I hope I don't get flamed for that. Nah, it seems like a pretty civil group here. There is a third solution, but I believe it requires you to have at least two separate IPs available. You run a separate IMAPd on each IP, and this lets you have the same user id at each domain. And then each domain is served on a different IP. You could have two separate installations of SquirrelMail, each pointed at the separate IMAPd. My friend wrote an explanation of this configuration, based on Cyrus, which you might find helpful. http://www.phildev.net/cyrus/ I hope this helps. |