|
|
|
|
||||||
| comp.mail.sendmail Configuring and using the BSD sendmail agent. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I have several sites hosted under on hosted virtual dedicated server that
has one primary server where all email comes in. I can not have duplicate email accounts because of this. I can have multiple domain names on this account using Apache vhosts. I migrated two web sites to my VDS. Each had an email account for "joe". The first one (domianB.com) to move got that name - actually an alias. The next site to move (domainC.com) had a "joe" associated with it so I added him as "joseph". However, old contacts who don't know about the email change still email joe@domainC.com but it actually gets picked up by joe@domainB.com I understand why this is happening but hope these is a way to filter or somehow identify emails intended for joe@domaonC.com and have them go to joseph@domainC.com? I have access to edit most of the sendmail files including sendmail.mc Any ideas are MUCH appreciated! |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
Paul wrote:
> I migrated two web sites to my VDS. Each had an email account for > "joe". The first one (domianB.com) to move got that name - actually > an alias. The next site to move (domainC.com) had a "joe" associated > with it so I added him as "joseph". You do not need to do this. Nor should you as an email administrator really impose this on clients. > However, old contacts who don't know about the email change still > email joe@domainC.com but it actually gets picked up by > joe@domainB.com *nod* > I understand why this is happening but hope these is a way to filter > or somehow identify emails intended for joe@domaonC.com and have them > go to joseph@domainC.com? There is. (See below) > I have access to edit most of the sendmail files including > sendmail.mc Good, you will need to be able to do so. > Any ideas are MUCH appreciated! Configure and use VirtUserTable. VirtUserTable allows you to specify the full email address to a user name mapping. I.e. "joe@domainB.com -> joe" and "joe@domainC.com -> joseph". Seeing as how you now have people using "joseph@domainC.com" you need to add "joseph@domainC.com -> joseph" too. In short, VirtUserTable abstracts email addresses from the mail box / user name that they go to. Thus, you can have as many email addresses with duplicate local (left) parts as you want so long as there is no duplication within the domain (right) part. I hope this s. If you want / need setting this up, let us know. Grant. . . . |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
>> I understand why this is happening but hope these is a way to filter
>> or somehow identify emails intended for joe@domaonC.com and have them >> go to joseph@domainC.com? > > There is. (See below) > >> I have access to edit most of the sendmail files including >> sendmail.mc > > Good, you will need to be able to do so. > >> Any ideas are MUCH appreciated! > > Configure and use VirtUserTable. VirtUserTable allows you to specify the > full email address to a user name mapping. I.e. "joe@domainB.com -> joe" > and "joe@domainC.com -> joseph". Seeing as how you now have people using > "joseph@domainC.com" you need to add "joseph@domainC.com -> joseph" too. > > In short, VirtUserTable abstracts email addresses from the mail box / user > name that they go to. Thus, you can have as many email addresses with > duplicate local (left) parts as you want so long as there is no > duplication within the domain (right) part. > > I hope this s. If you want / need setting this up, let us know. > > Grant. . . . Grant - that is IMMENSELY ful - many thanks. Here is the pertinent snippet of the VirtUserTable: joseph@domainA.com joseph joseph@domainB.com joseph joseph@domainC.com joseph joe@domainA.com joe joe@domainB.com joe joe@domainC.com joe If I want joe@domainB to be picked up be the account name joseph I would change the above to: joseph@domainA.com joseph joseph@domainB.com joseph joseph@domainC.com joseph joe@domainA.com joe joe@domainB.com joseph joe@domainC.com joe Right? Then restart sendmail? |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
Paul wrote:
> Grant - that is IMMENSELY ful - many thanks. Ah, yes, I remember making that same realization about 7 years ago. Once you go VirtUserTable, you will quite likely NEVER go back. It take so little to set up and can offer so much. > If I want joe@domainB to be picked up be the account name joseph I would > change the above to: .... > Right? Yes. > Then restart sendmail? You need to remake the virtusertable map file. The /etc/mail/virtusertable is really a source file used to generate the map file that Sendmail uses. By the way, you do not need to restart Sendmail, as the new map file is picked up automatically. This is yet again one of the nice things about virtusertable and maps. Grant. . . . |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
>> Then restart sendmail?
> > You need to remake the virtusertable map file. The > /etc/mail/virtusertable is really a source file used to generate the map > file that Sendmail uses. > > By the way, you do not need to restart Sendmail, as the new map file is > picked up automatically. This is yet again one of the nice things about > virtusertable and maps. > > Grant. . . . Grant - you have been most ful. Once I edit the "virtusertable" file, how do I "remake the virtusertable map file"? Do I need to do anything with "virtusertable.db" or is that what happens when I remake it? Many thanks again! |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
Paul wrote:
> Grant - you have been most ful. You are welcome. > Once I edit the "virtusertable" file, how do I "remake the > virtusertable map file"? If you are running a map type of "hash" you use this command. makemap hash /etc/mail/virtusertable < /etc/mail/virtusertable This will re-generate your virtusertable map file for you. You may need to replace "hash" with a different type of map depending on how your system is configured. If you look at the sendmail.mc or sendmail.cf file on the line that references virtusertable, you should see what map type to use. > Do I need to do anything with "virtusertable.db" or is that what > happens when I remake it? No, as above, this file is the map file and is updated by the makemap command. Seeing as how you have an extension of ".db" I think you are running a hash map, so the above command should be good. I believe the other types of maps are dependent on which operating system / distribution you are using. Linux tend to use hash. Grant. . . . |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
>
> If you are running a map type of "hash" you use this command. > > makemap hash /etc/mail/virtusertable < /etc/mail/virtusertable > > This will re-generate your virtusertable map file for you. You may need > to replace "hash" with a different type of map depending on how your > system is configured. If you look at the sendmail.mc or sendmail.cf file > on the line that references virtusertable, you should see what map type to > use. > >> Do I need to do anything with "virtusertable.db" or is that what >> happens when I remake it? > > No, as above, this file is the map file and is updated by the makemap > command. Seeing as how you have an extension of ".db" I think you are > running a hash map, so the above command should be good. I believe the > other types of maps are dependent on which operating system / distribution > you are using. Linux tend to use hash. > > > > Grant. . . . Many thanks. Now I just have to talk the host into running it. Many thanks again! You have been very ful. |
|
|
|
#8 |
|
Messages: n/a
Hébergeur: |
Grant - my host will not allow me access to use makemap. They use Redhat
Enterprise 4 and I have a test box with centOS. Can I copy the virtusertable to the test box, makemap there and copy it back, since centOS is bascially Redhat Enterprise 4? |
|
|
|
#9 |
|
Messages: n/a
Hébergeur: |
* Grant Taylor wrote:
> Linux tend to use hash. So much for a drug free work environment. Now back to our regularly scheduled newsfroup :-) |
|
|
|
#10 |
|
Messages: n/a
Hébergeur: |
Paul wrote:
> Grant - my host will not allow me access to use makemap. They use Redhat > Enterprise 4 and I have a test box with centOS. Can I copy the > virtusertable to the test box, makemap there and copy it back, since centOS > is bascially Redhat Enterprise 4? In theory, if the distors are enough alike (same libraries configured the same way), probably. However I do not know either one of them well enough to say yes or no. Do you not have command line / compilation tool access? If you do, (I believe) makemap is included with the source of Sendmail so you could compile your own instance of it and update your virtusertable. Can I ask, how are you administering your virtusertable now if you don't have access to makemap? Or are you using a web interface that may take care of this for you? Grant. . . . |
|
|
|
#11 |
|
Messages: n/a
Hébergeur: |
NPG wrote:
>> Linux tend to use hash. > So much for a drug free work environment. Yes, but are there any brownies??? Grant. . . . |
|
|
|
#12 |
|
Messages: n/a
Hébergeur: |
Grant Taylor wrote:
> Paul wrote: > >> Grant - my host will not allow me access to use makemap. They use >> Redhat Enterprise 4 and I have a test box with centOS. Can I copy the >> virtusertable to the test box, makemap there and copy it back, since >> centOS is bascially Redhat Enterprise 4? > > > In theory, if the distors are enough alike (same libraries configured > the same way), probably. However I do not know either one of them well > enough to say yes or no. > > Do you not have command line / compilation tool access? If you do, (I > believe) makemap is included with the source of Sendmail so you could > compile your own instance of it and update your virtusertable. > > Can I ask, how are you administering your virtusertable now if you don't > have access to makemap? Or are you using a web interface that may take > care of this for you? I'm wondering too how Paul maintains his tables without access to the makemap program. On the other hand... Sendmail _can_ be told to use plain text tables. Could that be the case on your system Paul? From doc/op/op.*: text Text file lookups. The format of the text file is defined by the -k (key field num- ber), -v (value field number), and -z (field delimiter) flags. A line like FEATURE(`virtusertable', `text -k0 -v1 /etc/mail/virtusers') in your .mc file would configure sendmail to use a plain text file. The first field on a line will be the key and the second field the value. The field separator defaults to any white space IIRC. Performance of plain text lookups will be bad compared with a hash table. I do NOT recommend this for high volume servers using hughe tables. Regards, Kees. -- Kees Theunissen. |
|
|
|
#13 |
|
Messages: n/a
Hébergeur: |
On Apr 24, 4:57 pm, "Paul" <l...@invalid.com> wrote:
> I have several sites hosted under on hosted virtual dedicated server that > has one primary server where all email comes in. I can not have duplicate > email accounts because of this. I can have multiple domain names on this > account using Apache vhosts. > > I migrated two web sites to my VDS. Each had an email account for "joe". > The first one (domianB.com) to move got that name - actually an alias. The > next site to move (domainC.com) had a "joe" associated with it so I added > him as "joseph". > > However, old contacts who don't know about the email change still email > j...@domainC.com but it actually gets picked up by j...@domainB.com > > I understand why this is happening but hope these is a way to filter or > somehow identify emails intended for j...@domaonC.com and have them go to > jos...@domainC.com? > > I have access to edit most of the sendmail files including sendmail.mc > > Any ideas are MUCH appreciated! hi, you can map in virtual domain such that joe@domain2.com as joe.domain2@domain3.com. this would be an internal process. So the no body in the external can know that the mal is from joe.domain2@domain3.com. I have already done this but I had problem with pop3 side changes. Regards, Rajesh.K |
|
|
|
#14 |
|
Messages: n/a
Hébergeur: |
"Grant Taylor" <gtaylor@riverviewtech.net> wrote in message
news:mailman.599.1177516270.28999.comp.mail.sendma il@maillists.riverviewtech.net... > Paul wrote: >> Grant - my host will not allow me access to use makemap. They use Redhat >> Enterprise 4 and I have a test box with centOS. Can I copy the >> virtusertable to the test box, makemap there and copy it back, since >> centOS is bascially Redhat Enterprise 4? > > In theory, if the distors are enough alike (same libraries configured the > same way), probably. However I do not know either one of them well enough > to say yes or no. > > Do you not have command line / compilation tool access? If you do, (I > believe) makemap is included with the source of Sendmail so you could > compile your own instance of it and update your virtusertable. > > Can I ask, how are you administering your virtusertable now if you don't > have access to makemap? Or are you using a web interface that may take > care of this for you? > > > > Grant. . . . I am managing user accounts from a front-end on my virtual dedicated server. I am a complete newbie to sendmail. |
|
![]() |
| Outils de la discussion | |
|
|