|
|
|
|
||||||
| comp.mail.sendmail Configuring and using the BSD sendmail agent. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I'm sure this has a simple answer, but but 4-5 hours searching turned up
nothing. I have sendmail, cyrus imap and fetchmail setup. I can grab mail with fetchmail and deliver it to a IMAP user. I can't figure out how to get mail from the local machine delivered to a IMAP user. For example: mail username results in mail being sent to username@myhost.localhost. Sendmail does not know how to deliver that. I want it to deliver to username. I tried the nocanonify feature, but no luck. Thanks, Andy |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
Andy Howell <spam-andy-be-howell-gone@austin.rr.com> writes:
> I'm sure this has a simple answer, but but 4-5 hours searching turned > up nothing. > > I have sendmail, cyrus imap and fetchmail setup. I can grab mail with > fetchmail and deliver it to a IMAP user. > > I can't figure out how to get mail from the local machine delivered to > a IMAP user. > > For example: > > mail username > > results in mail being sent to username@myhost.localhost. Sendmail does > not know how to deliver that. I want it to deliver to username. > > I tried the nocanonify feature, but no luck. What is reported by the test command below? [executed by root] # "this host" email name seen by MSA echo '$j' | sendmail -Ac -bt # "this host" email name seen by MTA echo '$j' | sendmail -bt # list of local email domains seen by MTA echo '$=w' | sendmail -bt -- [pl>en: Andrew] Andrzej Adam Filip : anfi@priv.onet.pl : anfi@xl.wp.pl Before You Ask: http://anfi.homeunix.net/sendmail/B4UAsk-Sendmail.html |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
Andrzej Adam Filip wrote:
> Andy Howell <spam-andy-be-howell-gone@austin.rr.com> writes: > >> I'm sure this has a simple answer, but but 4-5 hours searching turned >> up nothing. >> >> I have sendmail, cyrus imap and fetchmail setup. I can grab mail with >> fetchmail and deliver it to a IMAP user. >> >> I can't figure out how to get mail from the local machine delivered to >> a IMAP user. >> >> For example: >> >> mail username >> >> results in mail being sent to username@myhost.localhost. Sendmail does >> not know how to deliver that. I want it to deliver to username. >> >> I tried the nocanonify feature, but no luck. Andrzej, > What is reported by the test command below? [executed by root] > # "this host" email name seen by MSA > echo '$j' | sendmail -Ac -bt furball.localdomain > # "this host" email name seen by MTA > echo '$j' | sendmail -bt furball.localdomain > # list of local email domains seen by MTA > echo '$=w' | sendmail -bt [172.16.1.14] localhost.localdomain furball localhost furball2 Thanks, Andy |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
Andy Howell <spam-andy-be-howell-gone@austin.rr.com> writes:
> Andrzej Adam Filip wrote: >> Andy Howell <spam-andy-be-howell-gone@austin.rr.com> writes: >> >>> I'm sure this has a simple answer, but but 4-5 hours searching turned >>> up nothing. >>> >>> I have sendmail, cyrus imap and fetchmail setup. I can grab mail with >>> fetchmail and deliver it to a IMAP user. >>> >>> I can't figure out how to get mail from the local machine delivered to >>> a IMAP user. >>> >>> For example: >>> >>> mail username >>> >>> results in mail being sent to username@myhost.localhost. Sendmail does >>> not know how to deliver that. I want it to deliver to username. >>> >>> I tried the nocanonify feature, but no luck. > > Andrzej, > >> What is reported by the test command below? [executed by root] > > >> # "this host" email name seen by MSA >> echo '$j' | sendmail -Ac -bt > furball.localdomain > >> # "this host" email name seen by MTA >> echo '$j' | sendmail -bt > furball.localdomain >> # list of local email domains seen by MTA >> echo '$=w' | sendmail -bt > [172.16.1.14] > localhost.localdomain > furball > localhost > furball2 *Fast* fix: Add furball.localdomain to list of local email domains as described (among other things) at the link below: http://www.sendmail.org/faq/section4.html#4.5 It should solve "local to local" mailings but you will face problems sending to "internet recipients". -- [pl>en: Andrew] Andrzej Adam Filip : anfi@priv.onet.pl : anfi@xl.wp.pl Before You Ask: http://anfi.homeunix.net/sendmail/B4UAsk-Sendmail.html |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
"Andrzej Adam Filip" <anfi@onet.eu> wrote in message news:87zm4yge69.fsf@anfi.homeunix.net... > Andy Howell <spam-andy-be-howell-gone@austin.rr.com> writes: > >> Andrzej Adam Filip wrote: >>> Andy Howell <spam-andy-be-howell-gone@austin.rr.com> writes: >>> >>>> I'm sure this has a simple answer, but but 4-5 hours searching turned >>>> up nothing. >>>> >>>> I have sendmail, cyrus imap and fetchmail setup. I can grab mail with >>>> fetchmail and deliver it to a IMAP user. >>>> >>>> I can't figure out how to get mail from the local machine delivered to >>>> a IMAP user. >>>> >>>> For example: >>>> >>>> mail username >>>> >>>> results in mail being sent to username@myhost.localhost. Sendmail does >>>> not know how to deliver that. I want it to deliver to username. >>>> >>>> I tried the nocanonify feature, but no luck. >> >> Andrzej, >> >>> What is reported by the test command below? [executed by root] >> >> >>> # "this host" email name seen by MSA >>> echo '$j' | sendmail -Ac -bt >> furball.localdomain >> >>> # "this host" email name seen by MTA >>> echo '$j' | sendmail -bt >> furball.localdomain >>> # list of local email domains seen by MTA >>> echo '$=w' | sendmail -bt >> [172.16.1.14] >> localhost.localdomain >> furball >> localhost >> furball2 > > *Fast* fix: > Add furball.localdomain to list of local email domains as described > (among other things) at the link below: > http://www.sendmail.org/faq/section4.html#4.5 > > It should solve "local to local" mailings but you will face problems > sending to "internet recipients". > > -- > [pl>en: Andrew] Andrzej Adam Filip : anfi@priv.onet.pl : anfi@xl.wp.pl > Before You Ask: http://anfi.homeunix.net/sendmail/B4UAsk-Sendmail.html Oddly enough I have the same problem, and my local-host-names file seems correct. My syslog indicates that sendmail doesn't recognize my own mail. A quirk here might be that the DNS for "mydomain.com" defaults to another machine, and I'm only trying to handle mail for "mymachine.mydomain.com". But I'm lost. >>echo '$j' | sendmail -Ac -bt myhost.mydomain.com >> echo '$j' | sendmail -bt myhost.mydomain.com >> echo '$=w' | sendmail -bt loopback [loopback] localhost.mydomain.com mail1.mydomain.com myhost.mydomain.com Every one of these is in my local-host-names file. I confirmed that my sendmail.cf contains: Fw/etc/mail/local-host-names I could use a smart idea here. |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
Andrzej Adam Filip wrote:
> Andy Howell <spam-andy-be-howell-gone@austin.rr.com> writes: > >> Andrzej Adam Filip wrote: >>> Andy Howell <spam-andy-be-howell-gone@austin.rr.com> writes: >>> >>>> I'm sure this has a simple answer, but but 4-5 hours searching turned >>>> up nothing. >>>> >>>> I have sendmail, cyrus imap and fetchmail setup. I can grab mail with >>>> fetchmail and deliver it to a IMAP user. >>>> >>>> I can't figure out how to get mail from the local machine delivered to >>>> a IMAP user. >>>> >>>> For example: >>>> >>>> mail username >>>> >>>> results in mail being sent to username@myhost.localhost. Sendmail does >>>> not know how to deliver that. I want it to deliver to username. >>>> >>>> I tried the nocanonify feature, but no luck. >> Andrzej, >> >>> What is reported by the test command below? [executed by root] >> >>> # "this host" email name seen by MSA >>> echo '$j' | sendmail -Ac -bt >> furball.localdomain >> >>> # "this host" email name seen by MTA >>> echo '$j' | sendmail -bt >> furball.localdomain >>> # list of local email domains seen by MTA >>> echo '$=w' | sendmail -bt >> [172.16.1.14] >> localhost.localdomain >> furball >> localhost >> furball2 > > *Fast* fix: > Add furball.localdomain to list of local email domains as described > (among other things) at the link below: > http://www.sendmail.org/faq/section4.html#4.5 > > It should solve "local to local" mailings but you will face problems > sending to "internet recipients". > Andrzej, You're right, now I'm having problems with sending mail. I have my ISP defined as a SMART_HOST. When mail gets sent from my local machine, the sender is jeremy@furball.localdomain. The ISP's sendmail rejects that because jeremy@furball.localdomain does not exist. From reading the Sendmail book, it looks like I have to write a S= rule for the "relay" mailer, but I haven't figured out how to do that. I guess a need a map that translates local machine users to one of my mail addresses at my ISP. Any hints on how I do that? Thanks, Andy |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
Andy Howell <spam-andy-be-howell-gone@austin.rr.com> writes:
> Andrzej Adam Filip wrote: >> Andy Howell <spam-andy-be-howell-gone@austin.rr.com> writes: >> >>> Andrzej Adam Filip wrote: >>>> Andy Howell <spam-andy-be-howell-gone@austin.rr.com> writes: >>>> >>>>> I'm sure this has a simple answer, but but 4-5 hours searching turned >>>>> up nothing. >>>>> >>>>> I have sendmail, cyrus imap and fetchmail setup. I can grab mail with >>>>> fetchmail and deliver it to a IMAP user. >>>>> >>>>> I can't figure out how to get mail from the local machine delivered to >>>>> a IMAP user. >>>>> >>>>> For example: >>>>> >>>>> mail username >>>>> >>>>> results in mail being sent to username@myhost.localhost. Sendmail does >>>>> not know how to deliver that. I want it to deliver to username. >>>>> >>>>> I tried the nocanonify feature, but no luck. >>> Andrzej, >>> >>>> What is reported by the test command below? [executed by root] >>> >>>> # "this host" email name seen by MSA >>>> echo '$j' | sendmail -Ac -bt >>> furball.localdomain >>> >>>> # "this host" email name seen by MTA >>>> echo '$j' | sendmail -bt >>> furball.localdomain >>>> # list of local email domains seen by MTA >>>> echo '$=w' | sendmail -bt >>> [172.16.1.14] >>> localhost.localdomain >>> furball >>> localhost >>> furball2 >> >> *Fast* fix: >> Add furball.localdomain to list of local email domains as described >> (among other things) at the link below: >> http://www.sendmail.org/faq/section4.html#4.5 >> >> It should solve "local to local" mailings but you will face problems >> sending to "internet recipients". >> > > Andrzej, > > You're right, now I'm having problems with sending mail. I > have my ISP defined as a SMART_HOST. When mail gets sent from my local > machine, the sender is jeremy@furball.localdomain. The ISP's sendmail > rejects that because jeremy@furball.localdomain does not exist. > > From reading the Sendmail book, it looks like I have to write a S= > rule for the "relay" mailer, but I haven't figured out how to do > that. I guess a need a map that translates local machine users to one > of my mail addresses at my ISP. > > Any hints on how I do that? You may choose one of the recipes below: * assign your host "internet visible name" [ another host may act as email gateway for incoming messages ] http://www.sendmail.org/m4/whoami.html * make your sendmail masquerade as different host http://www.sendmail.org/m4/masquerading.html -- [pl>en: Andrew] Andrzej Adam Filip : anfi@priv.onet.pl : anfi@xl.wp.pl Before You Ask: http://anfi.homeunix.net/sendmail/B4UAsk-Sendmail.html |
|
|
|
#8 |
|
Messages: n/a
Hébergeur: |
"Jack Gostl" <gostl@argoscomp.com> writes:
> "Andrzej Adam Filip" <anfi@onet.eu> wrote in message > news:87zm4yge69.fsf@anfi.homeunix.net... >> Andy Howell <spam-andy-be-howell-gone@austin.rr.com> writes: >> >>> Andrzej Adam Filip wrote: >>>> Andy Howell <spam-andy-be-howell-gone@austin.rr.com> writes: >>>> >>>>> I'm sure this has a simple answer, but but 4-5 hours searching turned >>>>> up nothing. >>>>> >>>>> I have sendmail, cyrus imap and fetchmail setup. I can grab mail with >>>>> fetchmail and deliver it to a IMAP user. >>>>> >>>>> I can't figure out how to get mail from the local machine delivered to >>>>> a IMAP user. >>>>> >>>>> For example: >>>>> >>>>> mail username >>>>> >>>>> results in mail being sent to username@myhost.localhost. Sendmail does >>>>> not know how to deliver that. I want it to deliver to username. >>>>> >>>>> I tried the nocanonify feature, but no luck. >>> >>> Andrzej, >>> >>>> What is reported by the test command below? [executed by root] >>> >>> >>>> # "this host" email name seen by MSA >>>> echo '$j' | sendmail -Ac -bt >>> furball.localdomain >>> >>>> # "this host" email name seen by MTA >>>> echo '$j' | sendmail -bt >>> furball.localdomain >>>> # list of local email domains seen by MTA >>>> echo '$=w' | sendmail -bt >>> [172.16.1.14] >>> localhost.localdomain >>> furball >>> localhost >>> furball2 >> >> *Fast* fix: >> Add furball.localdomain to list of local email domains as described >> (among other things) at the link below: >> http://www.sendmail.org/faq/section4.html#4.5 >> >> It should solve "local to local" mailings but you will face problems >> sending to "internet recipients". > > Oddly enough I have the same problem, and my local-host-names file seems > correct. My syslog indicates that sendmail doesn't recognize my own mail. > > A quirk here might be that the DNS for "mydomain.com" defaults to another > machine, and I'm only trying to handle mail for "mymachine.mydomain.com". > But I'm lost. > > >>>echo '$j' | sendmail -Ac -bt > myhost.mydomain.com > >>> echo '$j' | sendmail -bt > myhost.mydomain.com > >>> echo '$=w' | sendmail -bt > loopback > [loopback] > localhost.mydomain.com > mail1.mydomain.com > myhost.mydomain.com > > Every one of these is in my local-host-names file. I confirmed that my > sendmail.cf contains: > Fw/etc/mail/local-host-names > > I could use a smart idea here. "First to check" explanation: Sendmail daemon "remembers" local-host-names as it was when sendmail daemon was started or HUPed. Restart (or HUP) your sendmail daemon before checking more sinister causes. -- [pl>en: Andrew] Andrzej Adam Filip : anfi@priv.onet.pl : anfi@xl.wp.pl Before You Ask: http://anfi.homeunix.net/sendmail/B4UAsk-Sendmail.html |
|
|
|
#9 |
|
Messages: n/a
Hébergeur: |
Andrzej Adam Filip wrote:
> Andy Howell <spam-andy-be-howell-gone@austin.rr.com> writes: > >> Andrzej Adam Filip wrote: >>> Andy Howell <spam-andy-be-howell-gone@austin.rr.com> writes: >>> >>>> Andrzej Adam Filip wrote: >>>>> Andy Howell <spam-andy-be-howell-gone@austin.rr.com> writes: >>>>> >>>>>> I'm sure this has a simple answer, but but 4-5 hours searching turned >>>>>> up nothing. >>>>>> >>>>>> I have sendmail, cyrus imap and fetchmail setup. I can grab mail with >>>>>> fetchmail and deliver it to a IMAP user. >>>>>> >>>>>> I can't figure out how to get mail from the local machine delivered to >>>>>> a IMAP user. >>>>>> >>>>>> For example: >>>>>> >>>>>> mail username >>>>>> >>>>>> results in mail being sent to username@myhost.localhost. Sendmail does >>>>>> not know how to deliver that. I want it to deliver to username. >>>>>> >>>>>> I tried the nocanonify feature, but no luck. >>>> Andrzej, >>>> >>>>> What is reported by the test command below? [executed by root] >>>>> # "this host" email name seen by MSA >>>>> echo '$j' | sendmail -Ac -bt >>>> furball.localdomain >>>> >>>>> # "this host" email name seen by MTA >>>>> echo '$j' | sendmail -bt >>>> furball.localdomain >>>>> # list of local email domains seen by MTA >>>>> echo '$=w' | sendmail -bt >>>> [172.16.1.14] >>>> localhost.localdomain >>>> furball >>>> localhost >>>> furball2 >>> *Fast* fix: >>> Add furball.localdomain to list of local email domains as described >>> (among other things) at the link below: >>> http://www.sendmail.org/faq/section4.html#4.5 >>> >>> It should solve "local to local" mailings but you will face problems >>> sending to "internet recipients". >>> >> Andrzej, >> >> You're right, now I'm having problems with sending mail. I >> have my ISP defined as a SMART_HOST. When mail gets sent from my local >> machine, the sender is jeremy@furball.localdomain. The ISP's sendmail >> rejects that because jeremy@furball.localdomain does not exist. >> >> From reading the Sendmail book, it looks like I have to write a S= >> rule for the "relay" mailer, but I haven't figured out how to do >> that. I guess a need a map that translates local machine users to one >> of my mail addresses at my ISP. >> >> Any hints on how I do that? > > You may choose one of the recipes below: > * assign your host "internet visible name" > [ another host may act as email gateway for incoming messages ] > http://www.sendmail.org/m4/whoami.html > * make your sendmail masquerade as different host > http://www.sendmail.org/m4/masquerading.html > Andrzej, Thanks. That gets me half-way there. With MASQUERADE_AS(`host.domain') and FEATURE(`masquerade_envelope') My mail is going out with the domain masqueraded, but not the user. The user name on my local machines, andy, is not the same as my email at my ISP. How do I map the sender? I also want things from root to get forwarded to me. I can setup an alias to forward, but the sender will still be root. Is there a generic way to map the sender name? Thanks, Andy |
|
|
|
#10 |
|
Messages: n/a
Hébergeur: |
Andy Howell <spam-andy-be-howell-gone@austin.rr.com> writes:
> Andrzej Adam Filip wrote: >> Andy Howell <spam-andy-be-howell-gone@austin.rr.com> writes: >>> [...] >>> You're right, now I'm having problems with sending mail. I >>> have my ISP defined as a SMART_HOST. When mail gets sent from my local >>> machine, the sender is jeremy@furball.localdomain. The ISP's sendmail >>> rejects that because jeremy@furball.localdomain does not exist. >>> >>> From reading the Sendmail book, it looks like I have to write a S= >>> rule for the "relay" mailer, but I haven't figured out how to do >>> that. I guess a need a map that translates local machine users to one >>> of my mail addresses at my ISP. >>> >>> Any hints on how I do that? >> >> You may choose one of the recipes below: >> * assign your host "internet visible name" >> [ another host may act as email gateway for incoming messages ] >> http://www.sendmail.org/m4/whoami.html >> * make your sendmail masquerade as different host >> http://www.sendmail.org/m4/masquerading.html > > Thanks. That gets me half-way there. With > MASQUERADE_AS(`host.domain') and FEATURE(`masquerade_envelope') > > My mail is going out with the domain masqueraded, but not the > user. The user name on my local machines, andy, is not the same as my > email at my ISP. How do I map the sender? I also want things from root > to get forwarded to me. I can setup an alias to forward, but the > sender will still be root. Is there a generic way to map the sender > name? You can use FEATURE(`genericstable') to get "per user" masquerading. http://www.sendmail.org/tips/virtual-hosting.php BTW consider using FEATURE(`allmasquerade') in addition to FEATURE(`masquerade_envelope'). * by default sendmail masquearades only "From:" header (senders in headers) * allmasquerade masquerades also "To:"/"Cc:"/... headers (recipients in headers) * masquerade_envelope masquerades envelope sender -- [pl>en: Andrew] Andrzej Adam Filip : anfi@priv.onet.pl : anfi@xl.wp.pl Before You Ask: http://anfi.homeunix.net/sendmail/B4UAsk-Sendmail.html |
|
|
|
#11 |
|
Messages: n/a
Hébergeur: |
Andrzej Adam Filip wrote:
> Andy Howell <spam-andy-be-howell-gone@austin.rr.com> writes: > >> Andrzej Adam Filip wrote: >>> Andy Howell <spam-andy-be-howell-gone@austin.rr.com> writes: >>>> [...] >>>> You're right, now I'm having problems with sending mail. I >>>> have my ISP defined as a SMART_HOST. When mail gets sent from my local >>>> machine, the sender is jeremy@furball.localdomain. The ISP's sendmail >>>> rejects that because jeremy@furball.localdomain does not exist. >>>> >>>> From reading the Sendmail book, it looks like I have to write a S= >>>> rule for the "relay" mailer, but I haven't figured out how to do >>>> that. I guess a need a map that translates local machine users to one >>>> of my mail addresses at my ISP. >>>> >>>> Any hints on how I do that? >>> You may choose one of the recipes below: >>> * assign your host "internet visible name" >>> [ another host may act as email gateway for incoming messages ] >>> http://www.sendmail.org/m4/whoami.html >>> * make your sendmail masquerade as different host >>> http://www.sendmail.org/m4/masquerading.html >> Thanks. That gets me half-way there. With >> MASQUERADE_AS(`host.domain') and FEATURE(`masquerade_envelope') >> >> My mail is going out with the domain masqueraded, but not the >> user. The user name on my local machines, andy, is not the same as my >> email at my ISP. How do I map the sender? I also want things from root >> to get forwarded to me. I can setup an alias to forward, but the >> sender will still be root. Is there a generic way to map the sender >> name? > > You can use FEATURE(`genericstable') to get "per user" masquerading. > http://www.sendmail.org/tips/virtual-hosting.php > > BTW consider using FEATURE(`allmasquerade') in addition to > FEATURE(`masquerade_envelope'). > * by default sendmail masquearades only "From:" header (senders in headers) > * allmasquerade masquerades also "To:"/"Cc:"/... headers (recipients in headers) > * masquerade_envelope masquerades envelope sender > Andrzej, THANK YOU! That was what I needed. I added: FEATURE(`genericstable')dnl FEATURE(`generics_entire_domain')dnl GENERICS_DOMAIN(`localdomain')dnl and made a genericstable What better way to spend a Sunday than reading the Sendmail book and loosing a little hair. At least I know a bit more about sendmail now ![]() Thanks again for your . Andy |
|
|
|
#12 |
|
Messages: n/a
Hébergeur: |
Andy Howell <spam-andy-be-howell-gone@austin.rr.com> writes:
> [...] > What better way to spend a Sunday than reading the Sendmail book and > loosing a little hair. At least I know a bit more about sendmail now ![]() > > Thanks again for your . Sendmail is simple *after* ;-) It is sad that there is no "sendmail wiki". -- [pl>en: Andrew] Andrzej Adam Filip : anfi@priv.onet.pl : anfi@xl.wp.pl Before You Ask: http://anfi.homeunix.net/sendmail/B4UAsk-Sendmail.html |
|
![]() |
| Outils de la discussion | |
|
|