public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] logmail - need fully-qualified address
@ 2006-02-06 10:38 Bo Andresen
  2006-02-06 11:39 ` Neil Bothwick
  2006-05-26 10:03 ` [gentoo-user] logmail - need fully-qualified address Alexander Skwar
  0 siblings, 2 replies; 14+ messages in thread
From: Bo Andresen @ 2006-02-06 10:38 UTC (permalink / raw
  To: gentoo-user, 

Hi

I am having problems with the elog mail module failing to send mail due to the 
following error:

"!!! An error occured while trying to send logmail:\n{'bo.andresen@gmail.com': 
(504, '<portage>: Sender address rejected: need fully-qualified address')}"

I am using my ISP's SMTP server and it does work in mail program but 
apparently it has some requirements to the sender address that aren't 
fullfilled. My settings are as follows:

root@BA:~# grep LOG /etc/make.conf
PORTAGE_ELOG_CLASSES="info warn error log"
PORTAGE_ELOG_SYSTEM="save mail"
PORTAGE_ELOG_MAILURI="bo.andresen@gmail.com vip.cybercity.dk"

I did notice bug #116637 (http://bugs.gentoo.org/show_bug.cgi?id=116637) but 
do not know whether it is the same as this bug. Does anyone know howto solve 
this problem? Thanks in advance.

/Bo

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user] logmail - need fully-qualified address
  2006-02-06 10:38 [gentoo-user] logmail - need fully-qualified address Bo Andresen
@ 2006-02-06 11:39 ` Neil Bothwick
  2006-02-06 11:59   ` Bo Andresen
  2006-05-26 10:03 ` [gentoo-user] logmail - need fully-qualified address Alexander Skwar
  1 sibling, 1 reply; 14+ messages in thread
From: Neil Bothwick @ 2006-02-06 11:39 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 562 bytes --]

On Mon, 6 Feb 2006 11:38:24 +0100, Bo Andresen wrote:

> I am having problems with the elog mail module failing to send mail due
> to the following error:
> 
> "!!! An error occured while trying to send
> logmail:\n{'bo.andresen@gmail.com': (504, '<portage>: Sender address
> rejected: need fully-qualified address')}"

Does hostname -d return the correct domain. If portage cannot determine
the domain, it appears to send the mail from 'portage' instead of
'portage@domain'.


-- 
Neil Bothwick

This chicken has no beak, said Tom impeccably.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user] logmail - need fully-qualified address
  2006-02-06 11:39 ` Neil Bothwick
@ 2006-02-06 11:59   ` Bo Andresen
  2006-02-06 17:38     ` Bo Andresen
  0 siblings, 1 reply; 14+ messages in thread
From: Bo Andresen @ 2006-02-06 11:59 UTC (permalink / raw
  To: gentoo-user

This is a laptop which is being moved back and forth between home and 
university. When I wrote the previous mail I was at home. Now I am at the 
university.

On Monday 06 February 2006 12:39, Neil Bothwick wrote:
> Does hostname -d return the correct domain. If portage cannot determine
> the domain, it appears to send the mail from 'portage' instead of
> 'portage@domain'.

root@pc110-c:~# hostname -d
stud.ies.auc.dk

I will try the same command when I get home. Here at work, however, elog comes 
up with a different error ;) :

"!!! An error occured while trying to send logmail:\n(501, '<portage>: sender 
address must contain a domain', 'portage')"

root@pc110-c:~# cat /etc/conf.d/hostname
HOSTNAME="BA"

I don't think the my router/dhcp server overrides this hostname at home. And 
just in case it is of any use:

root@pc110-c:~# cat /etc/conf.d/domainname
# /etc/conf.d/domainname

# When setting up resolv.conf, what should take precedence?
#  0 = let dhcp/whatever override DNSDOMAIN
#  1 = override dhcp/whatever with DNSDOMAIN
OVERRIDE=0
DNSDOMAIN=""
NISDOMAIN=""

Thanks for your reply.

/Bo
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user] logmail - need fully-qualified address
  2006-02-06 11:59   ` Bo Andresen
@ 2006-02-06 17:38     ` Bo Andresen
  2006-02-07  9:42       ` Bo Andresen
  0 siblings, 1 reply; 14+ messages in thread
From: Bo Andresen @ 2006-02-06 17:38 UTC (permalink / raw
  To: gentoo-user

> On Monday 06 February 2006 12:39, Neil Bothwick wrote:
> > Does hostname -d return the correct domain. If portage cannot determine
> > the domain, it appears to send the mail from 'portage' instead of
> > 'portage@domain'.

Now I am back home again. The error message is again:
"!!! An error occured while trying to send logmail:\n(501, '<portage>: sender 
address must contain a domain', 'portage')"

And hostname -d returns naught. I don't know how to correct this problem.

root@BA:~# hostname
BA
root@BA:~# hostname -d
root@BA:~# grep `hostname` /etc/hosts
127.0.0.1       localhost BA

/Bo
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user] logmail - need fully-qualified address
  2006-02-06 17:38     ` Bo Andresen
@ 2006-02-07  9:42       ` Bo Andresen
  2006-02-07 14:16         ` Neil Bothwick
  0 siblings, 1 reply; 14+ messages in thread
From: Bo Andresen @ 2006-02-07  9:42 UTC (permalink / raw
  To: gentoo-user

Has anyone got this new elog mail module working? Or perhaps the elog custom 
module. I just attempted to enable the custom module instead and insert this 
elog command:

PORTAGE_ELOG_COMMAND="echo -p '${PACKAGE}' -f '${LOGFILE}' 
> /tmp/logprocessor"

These modules are enabled:
PORTAGE_ELOG_SYSTEM="save custom syslog"

For these classes:
PORTAGE_ELOG_CLASSES="info warn error log"

After a successful emerge I get the corresponding logfile, output is printed 
to the syslog, however, the custom module prints nothing:

root@pc110-c:~# cat /tmp/logprocessor
-p  -f

Does anyone know what I am doing wrong or can anyone direct me towards some 
proper documentation. What I have done so far has been based on 
make.conf.sample file in /etc. Searching on Google I didn't find much. :(

/Bo
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user] logmail - need fully-qualified address
  2006-02-07  9:42       ` Bo Andresen
@ 2006-02-07 14:16         ` Neil Bothwick
  2006-02-07 22:32           ` Bo Andresen
  0 siblings, 1 reply; 14+ messages in thread
From: Neil Bothwick @ 2006-02-07 14:16 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 920 bytes --]

On Tue, 7 Feb 2006 10:42:26 +0100, Bo Andresen wrote:

> PORTAGE_ELOG_COMMAND="echo -p '${PACKAGE}' -f '${LOGFILE}' 
> > /tmp/logprocessor"
> 
> These modules are enabled:
> PORTAGE_ELOG_SYSTEM="save custom syslog"
> 
> For these classes:
> PORTAGE_ELOG_CLASSES="info warn error log"
> 
> After a successful emerge I get the corresponding logfile, output is
> printed to the syslog, however, the custom module prints nothing:
> 
> root@pc110-c:~# cat /tmp/logprocessor
> -p  -f

The example is wrong, because the variables are resolved when the conf
file is sources. You need to put the whole command in single quotes, or
escape the $ signs.

PORTAGE_ELOG_COMMAND='echo >>/mnt/scratch/logprocessor -p ${PACKAGE} -f
${LOGFILE}'

will do what you want.

Your mail problem is addressed at http://bugs.gentoo.org/show_bug.cgi?id=116637


-- 
Neil Bothwick

Weird enough for government work.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user] logmail - need fully-qualified address
  2006-02-07 14:16         ` Neil Bothwick
@ 2006-02-07 22:32           ` Bo Andresen
  2006-02-07 23:58             ` Bo Andresen
  0 siblings, 1 reply; 14+ messages in thread
From: Bo Andresen @ 2006-02-07 22:32 UTC (permalink / raw
  To: gentoo-user

On Tuesday 07 February 2006 15:16, Neil Bothwick wrote:
> The example is wrong, because the variables are resolved when the conf
> file is sources. You need to put the whole command in single quotes, or
> escape the $ signs.
>

Sooo... /etc/make.conf.example contains this example:
#PORTAGE_ELOG_COMMAND="/path/to/logprocessor -p '${PACKAGE}' -f '${LOGFILE}'"

This is a bug, right? Should be:
#PORTAGE_ELOG_COMMAND="/path/to/logprocessor -p '\${PACKAGE}' -f 
'\${LOGFILE}'"
Right?

> PORTAGE_ELOG_COMMAND='echo >>/mnt/scratch/logprocessor -p ${PACKAGE} -f
> ${LOGFILE}'
> will do what you want.
>

I don't quite understand this command but nevertheless it works. And so does 
escaping the $ signs.

> Your mail problem is addressed at
> http://bugs.gentoo.org/show_bug.cgi?id=116637

Before I close this thread (now that I can get mails using the custom module), 
I would like to know whether someway knows an easy way in which to apply the 
patch proposed in the bug #116637?

But anyway, the custom module does work so thanks Neil. :D

-- 
Bo Andresen
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user] logmail - need fully-qualified address
  2006-02-07 22:32           ` Bo Andresen
@ 2006-02-07 23:58             ` Bo Andresen
  2006-02-08  0:31               ` [gentoo-user] " Harm Geerts
  0 siblings, 1 reply; 14+ messages in thread
From: Bo Andresen @ 2006-02-07 23:58 UTC (permalink / raw
  To: gentoo-user

On Tuesday 07 February 2006 23:32, Bo Andresen wrote:
> > Your mail problem is addressed at
> > http://bugs.gentoo.org/show_bug.cgi?id=116637
>
> Before I close this thread (now that I can get mails using the custom
> module), I would like to know whether someway knows an easy way in which to
> apply the patch proposed in the bug #116637?

Now (I think) I figured out how to patch it. Just copied the portage-2.1_pre4-r1 to
an overlay, downloaded the patch to FILESDIR, added the following line to
src_unpack() and reemerged portage.

patch ${WORKDIR}/${PN}-${PV}/pym/elog_modules/mod_mail.py  ${FILESDIR}/mod_mail.patch

It doesn't solve the problem at home though. As I understand it the error message:

"!!! An error occured while trying to send logmail:\n{'bo.andresen@gmail.com': 
(504, '<portage>: Sender address rejected: need fully-qualified address')}"

is the result of hostname -d returning nothing? I don't know how to solve that problem.
Tomorrow will show whether the patch solves the problem at the universitet network
where hostname -d does return a hostname that has been set up correctly be the dhcp
server.

-- 
Bo Andresen
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 14+ messages in thread

* [gentoo-user] Re: logmail - need fully-qualified address
  2006-02-07 23:58             ` Bo Andresen
@ 2006-02-08  0:31               ` Harm Geerts
  2006-02-08  3:10                 ` [gentoo-user] Re: logmail - need fully-qualified address [SOLVED] Bo Andresen
  0 siblings, 1 reply; 14+ messages in thread
From: Harm Geerts @ 2006-02-08  0:31 UTC (permalink / raw
  To: gentoo-user

On Wednesday 08 February 2006 00:58, Bo Andresen wrote:
> On Tuesday 07 February 2006 23:32, Bo Andresen wrote:
> > > Your mail problem is addressed at
> > > http://bugs.gentoo.org/show_bug.cgi?id=116637
> >
> > Before I close this thread (now that I can get mails using the custom
> > module), I would like to know whether someway knows an easy way in which
> > to apply the patch proposed in the bug #116637?
>
> Now (I think) I figured out how to patch it. Just copied the
> portage-2.1_pre4-r1 to an overlay, downloaded the patch to FILESDIR, added
> the following line to src_unpack() and reemerged portage.
>
> patch ${WORKDIR}/${PN}-${PV}/pym/elog_modules/mod_mail.py 
> ${FILESDIR}/mod_mail.patch
>
> It doesn't solve the problem at home though. As I understand it the error
> message:
>
> "!!! An error occured while trying to send
> logmail:\n{'bo.andresen@gmail.com': (504, '<portage>: Sender address
> rejected: need fully-qualified address')}"
>
> is the result of hostname -d returning nothing? I don't know how to solve
> that problem. Tomorrow will show whether the patch solves the problem at
> the universitet network where hostname -d does return a hostname that has
> been set up correctly be the dhcp server.

>From http://bugs.gentoo.org/show_bug.cgi?id=116637#c2
"""
this bug hit me too, however i was not able to fix it with your patch. i think
this is because of line 48 in mod_mail.py:

myconn.sendmail("portage", myrecipient, mymessage.as_string())

as you see, portage is still hardcoded there. I replaced it with
"portage@blubb.ch" and got my mails :)
"""

The system sends the mail to "portage", but it requires a FQDN.
It seems this is not automatically expanded to "portage@<localdomain>"

So I doubt hostname -d has any effect on it, but I haven't actually checked 
the code). You could do the same as Simon and replace "portage" with a valid 
email address untill this is fixed.

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user] Re: logmail - need fully-qualified address [SOLVED]
  2006-02-08  0:31               ` [gentoo-user] " Harm Geerts
@ 2006-02-08  3:10                 ` Bo Andresen
  0 siblings, 0 replies; 14+ messages in thread
From: Bo Andresen @ 2006-02-08  3:10 UTC (permalink / raw
  To: gentoo-user

On Wednesday 08 February 2006 01:31, Harm Geerts wrote:
> From http://bugs.gentoo.org/show_bug.cgi?id=116637#c2
> """
> this bug hit me too, however i was not able to fix it with your patch. i
> think this is because of line 48 in mod_mail.py:
>
> myconn.sendmail("portage", myrecipient, mymessage.as_string())
>
> as you see, portage is still hardcoded there. I replaced it with
> "portage@blubb.ch" and got my mails :)
> """
>
> The system sends the mail to "portage", but it requires a FQDN.
> It seems this is not automatically expanded to "portage@<localdomain>"
>
> So I doubt hostname -d has any effect on it, but I haven't actually checked
> the code). You could do the same as Simon and replace "portage" with a
> valid email address untill this is fixed.

Hi Harm

I didn't read the comments to the bug quite carefully enough to understand 
them until I saw this reply...

So what Alessandros proposed patch did was enable the user (i.e. me) to set 
the return-path of the mail by specifying PORTAGE_ELOG_MAILFROM 
in /etc/make.conf.

What Simon apparently did was hardcode the from address in the code directly.

Sooo... made this patch which allows the user to set both return-path and from 
address by specifying PORTAGE_ELOG_MAILFROM in make.conf: 
http://bugs.gentoo.org/attachment.cgi?id=79186

It does, however, seem quite clear that this wasn't the way the mail module 
was originally intended to work. But it does solve the problem. :)

Thanks to everyone who has replied to this thread.
-- 
Bo Andresen
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user] logmail - need fully-qualified address
  2006-02-06 10:38 [gentoo-user] logmail - need fully-qualified address Bo Andresen
  2006-02-06 11:39 ` Neil Bothwick
@ 2006-05-26 10:03 ` Alexander Skwar
  2006-05-26 10:45   ` Alexander Skwar
  2006-05-26 10:56   ` Bo Ørsted Andresen
  1 sibling, 2 replies; 14+ messages in thread
From: Alexander Skwar @ 2006-05-26 10:03 UTC (permalink / raw
  To: gentoo-user

Bo Andresen wrote:
> Hi
> 
> I am having problems with the elog mail module failing to send mail due to the 
> following error:
> 
> "!!! An error occured while trying to send logmail:\n{'bo.andresen@gmail.com': 
> (504, '<portage>: Sender address rejected: need fully-qualified address')}"
> 
> I am using my ISP's SMTP server and it does work in mail program but 
> apparently it has some requirements to the sender address that aren't 
> fullfilled. My settings are as follows:
> 
> root@BA:~# grep LOG /etc/make.conf
> PORTAGE_ELOG_CLASSES="info warn error log"
> PORTAGE_ELOG_SYSTEM="save mail"
> PORTAGE_ELOG_MAILURI="bo.andresen@gmail.com vip.cybercity.dk"
> 
> I did notice bug #116637 (http://bugs.gentoo.org/show_bug.cgi?id=116637) but 
> do not know whether it is the same as this bug. Does anyone know howto solve 
> this problem? Thanks in advance.
> 
> /Bo
> 

Hi!

I'm using ssmtp and thus also have this problem. Is there any
solution, which does NOT require patching portage, like suggested
in the above mentioned bug?

I'd like to stay with a light weight MTA like ssmtp. It doesn't
have to be ssmtp, though...

Thanks,

Alexander Skwar
-- 
PENGUINICITY!!
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user] logmail - need fully-qualified address
  2006-05-26 10:03 ` [gentoo-user] logmail - need fully-qualified address Alexander Skwar
@ 2006-05-26 10:45   ` Alexander Skwar
  2006-05-26 10:56   ` Bo Ørsted Andresen
  1 sibling, 0 replies; 14+ messages in thread
From: Alexander Skwar @ 2006-05-26 10:45 UTC (permalink / raw
  To: gentoo-user

Alexander Skwar wrote:

> I'm using ssmtp and thus also have this problem. Is there any
> solution, which does NOT require patching portage, like suggested
> in the above mentioned bug?

One of those patches is now integrated.

Alexander Skwar
-- 
FORTRAN is for pipe stress freaks and crystallography weenies.
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user] logmail - need fully-qualified address
  2006-05-26 10:03 ` [gentoo-user] logmail - need fully-qualified address Alexander Skwar
  2006-05-26 10:45   ` Alexander Skwar
@ 2006-05-26 10:56   ` Bo Ørsted Andresen
  2006-05-26 13:14     ` Alexander Skwar
  1 sibling, 1 reply; 14+ messages in thread
From: Bo Ørsted Andresen @ 2006-05-26 10:56 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 544 bytes --]

Friday 26 May 2006 12:03 skrev Alexander Skwar:
> I'm using ssmtp and thus also have this problem. Is there any
> solution, which does NOT require patching portage, like suggested
> in the above mentioned bug?

As I have stated to the bug report this issue was solved for me with portage 
2.1_pre9-r4. I have not needed to patch portage since that release. I you 
still seeing that exact error message? Using portage 2.1_rc2-*? What does the 
following give on your computer?

# grep ^PORTAGE_ELOG /etc/make.conf

-- 
Bo Andresen

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user] logmail - need fully-qualified address
  2006-05-26 10:56   ` Bo Ørsted Andresen
@ 2006-05-26 13:14     ` Alexander Skwar
  0 siblings, 0 replies; 14+ messages in thread
From: Alexander Skwar @ 2006-05-26 13:14 UTC (permalink / raw
  To: gentoo-user

Bo Ørsted Andresen wrote:
> I you 
> still seeing that exact error message?

Yes, I was - but that's because I did not set PORTAGE_ELOG_MAILFROM.
After now having done so, all is fine.

Alexander Skwar
-- 
"Imitation is the sincerest form of television."
-- The New Mighty Mouse
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2006-05-26 13:23 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-06 10:38 [gentoo-user] logmail - need fully-qualified address Bo Andresen
2006-02-06 11:39 ` Neil Bothwick
2006-02-06 11:59   ` Bo Andresen
2006-02-06 17:38     ` Bo Andresen
2006-02-07  9:42       ` Bo Andresen
2006-02-07 14:16         ` Neil Bothwick
2006-02-07 22:32           ` Bo Andresen
2006-02-07 23:58             ` Bo Andresen
2006-02-08  0:31               ` [gentoo-user] " Harm Geerts
2006-02-08  3:10                 ` [gentoo-user] Re: logmail - need fully-qualified address [SOLVED] Bo Andresen
2006-05-26 10:03 ` [gentoo-user] logmail - need fully-qualified address Alexander Skwar
2006-05-26 10:45   ` Alexander Skwar
2006-05-26 10:56   ` Bo Ørsted Andresen
2006-05-26 13:14     ` Alexander Skwar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox