Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 220473 - Remove mailer module (was: eselect mailer list does not show current selected mailer)
Summary: Remove mailer module (was: eselect mailer list does not show current selected...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo eselect Team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2008-05-05 21:57 UTC by Karl Hakimian
Modified: 2013-08-31 12:41 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karl Hakimian 2008-05-05 21:57:24 UTC
After selecting your mailer with eselect mailer set, doing a eselect list still does not highlight a mailer.

Reproducible: Always

Steps to Reproduce:
1.Have two mailwrapper compatible mailers installed
2.eselect set 1
3.eselect list

Actual Results:  
No mailer is marked as current.

Expected Results:  
The 1st mailer should be marked as current.

The problem is a missing basename call in do_list. The following patch takes care of the problem.

*** mailer.eselect.orig Mon May  5 14:53:01 2008
--- mailer.eselect      Mon May  5 14:51:01 2008
***************
*** 83,89 ****
                for (( i = 0 ; i < ${#targets[@]} ; i = i + 1 )) ; do
                        # any more elegant way to do this?
                        local profile
!                       profile="$(canonicalise ${ROOT}/etc/mail/mailer.conf )"
                        [[ ${targets[${i}]} == ${profile%.mailer} ]] && \
                                targets[${i}]="${targets[${i}]} $(highlight '*' )"
                        done
--- 83,89 ----
                for (( i = 0 ; i < ${#targets[@]} ; i = i + 1 )) ; do
                        # any more elegant way to do this?
                        local profile
!                       profile=`basename "$(canonicalise ${ROOT}/etc/mail/mailer.conf )"`
                        [[ ${targets[${i}]} == ${profile%.mailer} ]] && \
                                targets[${i}]="${targets[${i}]} $(highlight '*' )"
                        done
Comment 1 Alex Barker 2008-10-03 17:29:43 UTC
The suggested solution does not resolve my problem.  the script appears to be looking for /etc/mail/*.mailer however I do not have any files that resemble that, only mailer.conf.

I am using postfix as my mta with mailwrapper use.
Comment 2 Ulrich Müller gentoo-dev 2009-04-28 23:39:31 UTC
Thanks for the patch, committed to SVN (r516).

(In reply to comment #1)
> The suggested solution does not resolve my problem.  the script appears to be
> looking for /etc/mail/*.mailer however I do not have any files that resemble
> that, only mailer.conf.

Question to net-mail team: I seems that only few packages in mail-mta support "mailer-config" and "eselect mailer". Can you comment on the situation? Does it even make sense to keep the mailer.eselect module?
Comment 3 Torsten Veller (RETIRED) gentoo-dev 2009-04-29 06:16:36 UTC
(In reply to comment #2)
> Question to net-mail team: I seems that only few packages in mail-mta support
> "mailer-config" and "eselect mailer". Can you comment on the situation? Does it
> even make sense to keep the mailer.eselect module?

No. We want to remove or replace it.

Comment 4 Ulrich Müller gentoo-dev 2009-04-29 09:02:56 UTC
(In reply to comment #3)
> > Does it even make sense to keep the mailer.eselect module?
> 
> No. We want to remove or replace it.

Replace? By what?

@Karl: How do you get a list of mailers in "eselect mailer"? What ebuilds are installing /etc/mail/*.mailer files for you?
Comment 5 Tobias Scherbaum (RETIRED) gentoo-dev 2009-04-29 09:10:32 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Question to net-mail team: I seems that only few packages in mail-mta support
> > "mailer-config" and "eselect mailer". Can you comment on the situation? Does it
> > even make sense to keep the mailer.eselect module?
> 
> No. We want to remove or replace it.

As it's pretty much useless the way to go is to just remove it (i.e. to drop mailwrapper).
Comment 6 Karl Hakimian 2009-04-29 11:53:25 UTC
At this point, I don't remember the details of how I got the list to work, it was not working by default. The two mailers I was switching between were sendmail and ssmtp. There were files in /etc/mail ssmtp.mailer and sendmail.mailer that told the wrapper how to run things. I believe I had to create these manually for things to kind of work.
Comment 7 Ulrich Müller gentoo-dev 2009-04-30 07:43:01 UTC
I think that a non-functional module is merely confusing for users, so I've removed the mailer module from SVN. It won't be included with eselect-1.1* any more.

Concerning a possible replacement, a module based on libs/skel.bash might be a possible way. See the sci-libs/lapack ebuilds for an example how to use it.
However, such a module shouldn't go into eselect proper, but into a separate eselect-mailer package.
Comment 8 Karl Hakimian 2009-04-30 11:57:07 UTC
If this functionality is kept, I agree it belongs in a separate eselect-mailer package.
Comment 9 Alex Barker 2009-05-01 05:54:30 UTC
Just my 2cents.

I looked into this a while back and it appeared that most of the MTA's had removed support for this /etc/mail/*.mailer config.  The issue I had was with postfix and the mailwrapper use flag.  I think the removal is a good idea but the mta packages ( /usr/portage/mail-mta/ ) should be checked to make sure they do not still rely on it. 

Currently the following packages reference mailer.conf

sendmail-8.13.7-r1.ebuild
sendmail-8.14.0.ebuild
sendmail-8.14.2.ebuild
sendmail-8.13.6-r1.ebuild
sendmail-8.13.8.ebuild

netqmail-1.05-r4.ebuild
netqmail-1.05-r8.ebuild

qmail-ldap-1.03-r7.ebuild

msmtp-1.4.7.ebuild
msmtp-1.4.14.ebuild
msmtp-1.4.17.ebuild
msmtp-1.4.16.ebuild
msmtp-1.4.9.ebuild
msmtp-1.4.5.ebuild

courier-0.59.0.ebuild
courier-0.60.0.ebuild
courier-0.61.1.ebuild

nbsmtp-1.00-r3.ebuild

# Mailwrapper use
postfix-2.5.6.ebuild
postfix-2.5.5.ebuild
postfix-2.4.10.ebuild

exim-4.69.ebuild
exim-4.69-r1.ebuild
exim-4.69-r2.ebuild
Comment 10 Tobias Scherbaum (RETIRED) gentoo-dev 2009-05-02 21:35:45 UTC
(In reply to comment #9)

Thanks Alex! I'll try to get through that list and will try figure from which packages mailwrapper support can be removed easily. My plan (personal plan though) is to not removal functionality from an existing set of ebuilds during a series of minor versions (i.e. not from postfix-2.5, but from 2.6 onwoards). Though this functionality is mostly broken and noones using it anyway (I guess) people *may* rely on this and therefore i'd prefer to hold up on this removal for larger version bumps. Anyways, this is getting offtopic on this bugreport - guess I'll better create a new mailwrapper removal tracker ;)
Comment 11 Ulrich Müller gentoo-dev 2009-05-18 20:28:22 UTC
eselect-1.1_rc1 was released today, so all done on the eselect side. Therefore closing this bug.

(In reply to comment #10)
> Anyways, this is getting offtopic on this bugreport - guess I'll better create
> a new mailwrapper removal tracker ;)

Yes, please do.