The option for 'rewriteDomain' is not set from debconf.

Bug #160667 reported by PaulSchulz
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ssmtp (Debian)
New
Unknown
ssmtp (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

The command 'dpkg-reconfigure --priority=low ssmtp' does not set the 'rewriteDomain' option in /etc/ssmtp/ssmtp.conf.

When installed, this option is commented out in the /etc/ssmtp/ssmtp.conf file.

This file is created by the 'postinst' script, and the '#' is inserted, depending on whether '/etc/mailname' has been set ot not.

.. but.. the debconf 'config' script requires that the 'rewriteDomain' line be uncommented in order for the value to be set.

Revision history for this message
PaulSchulz (paulschulz) wrote :

The command 'dpkg-reconfigure --priority=low ssmtp' does not set the 'rewriteDomain' option in /etc/ssmtp/ssmtp.conf.

When installed, this option is commented out in the /etc/ssmtp/ssmtp.conf file.

This file is created by the 'postinst' script, and the '#' is inserted, depending on whether '/etc/mailname' has been set ot not.

.. but.. the debconf 'config' script requires that the 'rewriteDomain' line be uncommented in order for the value to be set.

Revision history for this message
PaulSchulz (paulschulz) wrote :

A Clarification: its the 'postinst' script which won't set any of the the parameters if they are commented out.

The following patch removes the code from the 'postinst' script which comments the parameter lines if they are empty.

Revision history for this message
PaulSchulz (paulschulz) wrote :

The following patch sets the "FromLineOverride" parameter to the default value set in 'debian/templates'.

Revision history for this message
In , Rob Epping (r-epping) wrote : rewriteDomain patch

Hi,

Here is a patch to resolve this bug.

--- ssmtp.postinst.orig 2007-03-08 06:24:50.000000000 +0000
+++ ssmtp.postinst 2009-02-02 15:34:43.000000000 +0000
@@ -53,7 +53,7 @@
        test -z "$FromOverride" && FromOverride=NO
        touch /etc/ssmtp/ssmtp.conf.tmp
        chmod 644 /etc/ssmtp/ssmtp.conf.tmp
- sed
"s/^root=.*/root=$root/;s/^mailhub=.*/mailhub=$mailhub/;s/^rewriteDomain
=.*/rewriteDomain=$rewritedomain/;s/^hostname=.*/hostname=$hostname/;s/^
FromLineOverride=.*/FromLineOverride=$FromOverride/;s/^#FromLineOverride
=.*/FromLineOverride=$FromOverride/" /etc/ssmtp/ssmtp.conf >
/etc/ssmtp/ssmtp.conf.tmp
+ sed
"s/^root=.*/root=$root/;s/^mailhub=.*/mailhub=$mailhub/;s/^rewriteDomain
=.*/rewriteDomain=$rewritedomain/;s/^#rewriteDomain=.*/rewriteDomain=$re
writedomain/;s/^hostname=.*/hostname=$hostname/;s/^FromLineOverride=.*/F
romLineOverride=$FromOverride/;s/^#FromLineOverride=.*/FromLineOverride=
$FromOverride/" /etc/ssmtp/ssmtp.conf > /etc/ssmtp/ssmtp.conf.tmp
        mv -f /etc/ssmtp/ssmtp.conf.tmp /etc/ssmtp/ssmtp.conf
 else
        touch /etc/ssmtp/ssmtp.conf

Sorry for the very long lines.

GRTNX,
RobJE
--

--

This e-mail is from Meteo Consult B.V., a MeteoGroup company. For more information, see http://www.weer.nl/gebruiksvoorwaarden.

This e-mail may contain confidential information. Only the addressee is permitted to read, copy, distribute or otherwise use this e-mail or any attachments. If you have received it in error, please contact the sender immediately. Any opinion expressed in this e-mail is personal to the sender and may not reflect the opinion of MeteoGroup.

Any e-mail reply to this address may be subject to interception or monitoring for operational reasons or for lawful business practices.

Revision history for this message
In , Laurent Bigonville (bigon) wrote : Re: ssmtp: postinst fails to set rewriteDomain when previously commented-out

Hi,

Any advancement on this bug? I've installed ssmtp and then rerun
dpkg-reconfigure to configure it and the value was not set
correctly, this bug is quite old.

Kind regards

Laurent Bigonville

Changed in ssmtp (Debian):
status: Unknown → New
Changed in ssmtp (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.