Koozali.org: home of the SME Server

Bug in ETRN retrieval - solution

Andrew Hodgson

Bug in ETRN retrieval - solution
« on: February 28, 2003, 04:56:58 PM »
Hi,

When telling the server through the web interface you want email to be triggered via ETRN (using fetchmail) - for most people this will not work, as the wrong parameter is sent to the remote server.

For the record, when you are sending ehe default ETRN parameter, this looks like this:

etrn domain.com

... where domain is the domain that the remote server is queuing mail for.

However, Fetchmail was sending the following:

etrn localhost

...which obviously did not work.

The trick to sort this out is to edit the file in /etc/fetchmail using a text editor to be the following:

/usr/bin/fetchmail --syslog --silent --protocol ETRN --fetchdomains yourdomain.com smtp.host.com > /dev/null 2>&1

This should all be on one line.  This has been working floorlessly since around 08:30 this morning, where the default provided by the web configuration program was failing.  What I now want to know is how to modify the template to get this in the template?  In what circumstances will this be overwritten by the default?

Thanks,
Andrew.

Bill Talcott

Re: Bug in ETRN retrieval - solution
« Reply #1 on: February 28, 2003, 05:30:22 PM »
FYI, /etc/fetchmail is templated. You need to make the changes to /etc/e-smith/templates(-custom)/etc/fetchmail/50ETRN for them to remain permanent.

        $OUT .= "/usr/bin/fetchmail --syslog $verbosity --protocol ";  
        $OUT .= "ETRN --smtphost '\@$DomainName' $SecondaryMailServer ";
        $OUT .= "> /dev/null 2>&1\n";

That's the code it uses in 5.5. I'm not sure what your /etc/e-smith/templates/etc/fetchmail/50ETRN looks like, but that code looks like it should spit out the proper output. Did you try re-expanding /etc/fetchmail, and seeing what it creates? It might just be some glitch, and rebuilding the file might fix it...

Ed Form

Re: Bug in ETRN retrieval - solution
« Reply #2 on: February 28, 2003, 05:31:53 PM »
Andrew Hodgson wrote:
>
> Hi,
>
> When telling the server through the web interface you want
> email to be triggered via ETRN (using fetchmail) - for most
> people this will not work, as the wrong parameter is sent to
> the remote server.
>
> For the record, when you are sending ehe default ETRN
> parameter, this looks like this:
>
> etrn domain.com
>
> ... where domain is the domain that the remote server is
> queuing mail for.
>
> However, Fetchmail was sending the following:
>
> etrn localhost

Which version of SME was this Andrew?

Ed Form

Andrew Hodgson

Re: Bug in ETRN retrieval - solution
« Reply #3 on: February 28, 2003, 08:27:04 PM »
Bill Talcott wrote:
>
> FYI, /etc/fetchmail is templated. You need to make the
> changes to
> /etc/e-smith/templates(-custom)/etc/fetchmail/50ETRN for them
> to remain permanent.
>
>         $OUT .= "/usr/bin/fetchmail --syslog $verbosity
> --protocol ";
>         $OUT .= "ETRN --smtphost '\@$DomainName'
> $SecondaryMailServer ";
>         $OUT .= "> /dev/null 2>&1\n";
>
> That's the code it uses in 5.5. I'm not sure what your
> /etc/e-smith/templates/etc/fetchmail/50ETRN looks like, but
> that code looks like it should spit out the proper output.
> Did you try re-expanding /etc/fetchmail, and seeing what it
> creates? It might just be some glitch, and rebuilding the
> file might fix it...

Hi,

First of all I am using 5.6, and even if that was a glitch, I can't see after reading the man pages how that would produce the right command for fetchmail.  The command should be (simply)
/usr/bin/fetchmail --protocol ETRN --fetchdomains yourdomain etrnhost.domain.com.

How do I alter this template, do I need to copy it back to the custom templates directory:
/etc/e-smith/templates-custom/etc/fetchmail/50etrn?  Also, is there a command to make the system see the new template?  If there is a web page on customising templates I would be grateful, although I have made the relevant customisation already.

Also, another thing I don't like is that it assumes that the virtual domains are going to be picked up by etrn also, which may not be the case.

Andrew.

Bill Talcott

Re: Bug in ETRN retrieval - solution
« Reply #4 on: February 28, 2003, 10:24:51 PM »
Andrew Hodgson wrote:
>
> Hi,
>
> First of all I am using 5.6, and even if that was a glitch, I
> can't see after reading the man pages how that would produce
> the right command for fetchmail.  The command should be
> (simply)
> /usr/bin/fetchmail --protocol ETRN --fetchdomains yourdomain
> etrnhost.domain.com.

"/usr/bin/fetchmail --syslog $verbosity --protocol ETRN --smtphost '\@$DomainName' $SecondaryMailServer > /dev/null 2>&1" is what that script will produce in the config file (with $verbosity, '\@$DomainName' and $SecondaryMailServer pulling their respective values from the configuration databse). Looks like the syntax may have changed a bit from 5.5 (smtphost vs. fetchdomains), but other than that the only difference is the --syslog.

> How do I alter this template, do I need to copy it back to
> the custom templates directory:
> /etc/e-smith/templates-custom/etc/fetchmail/50etrn?  Also, is
> there a command to make the system see the new template?  If
> there is a web page on customising templates I would be
> grateful, although I have made the relevant customisation
> already.

http://www.e-smith.org/custom/, linked from the front page of e-smith.org.

> Also, another thing I don't like is that it assumes that the
> virtual domains are going to be picked up by etrn also, which
> may not be the case.

Edit it out of your custom template then. That's what it's there for. =)

Andrew Hodgson

Re: Bug in ETRN retrieval - solution
« Reply #5 on: February 28, 2003, 10:47:26 PM »
Hi, bill,

Thanks for the help, I managed to edit the template and it went well, I also expanded the template and the change was made without fuss and also works.  I may also see if I can get ODMR working if I have the time.

If anyone wants the template email me and I will send it to them, successfully working with www.microtech.co.gg and my ISP server.

Thanks,
Andrew.