Mailx does not work

Hi,

since I’ve installed openSUSE 11.0 mailx has stopped to send mail and I don’t know why, and I’ve tried so much things to solve the problem that I don’t know what log post here… :frowning:

My internet provider is orange which need authentification :

Every time I try to send mail with echo “OK”| mailx -s “Test” myadress@yahoo.fr or myadress@orange.fr, the response is :

Diagnostic-Code: smtp; 554 <myadress@yahoo.fr>: Recipient address rejected:     Missing Authentication

I’ve modified the value POSTFIX_RELAYHOST=“smtp-msa.orange.fr:587” in the config file /etc/sysconfig/postfix and then postfix reload but it changes nothing…

Anyone could help me please ?

pc54g2 wrote:
> Hi,
>
> since I’ve installed openSUSE 11.0 mailx has stopped to send mail and I
> don’t know why, and I’ve tried so much things to solve the problem that
> I don’t know what log post here… :frowning:
>
> My internet provider is orange which need authentification :
>
> [smtp-msa.orange.fr]:587
>
> Every time I try to send mail with echo “OK”| mailx -s “Test”
> myadress@yahoo.fr or myadress@orange.fr, the response is :
>
>
> Code:
> --------------------
> Diagnostic-Code: smtp; 554 <myadress@yahoo.fr>: Recipient address rejected: Missing Authentication
> --------------------
>
>
> I’ve modified the value POSTFIX_RELAYHOST="[smtp-msa.orange.fr]:587" in
> the config file /etc/sysconfig/postfix and then -postfix reload- but it
> changes nothing…

See /usr/share/doc/packages/postfix/html/SASL_README.html
‘Enabling SASL authentication in the Postfix SMTP client’

/etc/postfix/main.cf:
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_type = cyrus

/etc/postfix/sasl_passwd:
foo.com username:password
bar.com username
[mail.myisp.net] username:password
[mail.myisp.net]:submission username:password

Thanks,

the value smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd was already existing in main.cf and I had to create smtp_sasl_type = cyrus

sasl_passwd contains this :

[smtp-msa.orange.fr]:587 mylogin:mypasswd

Then I made again postfix reload but another time error while sending the message :

Diagnostic-Code: smtp; 554 <myadress@yahoo.fr>: Recipient address rejected:Missing Authentication
egrep -v '^(#|$)' /etc/postfix/main.cf
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
mail_owner = postfix
unknown_local_recipient_reject_code = 550
debug_peer_level = 2
debugger_command =
         PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
         xxgdb $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = maildrop
html_directory = /usr/share/doc/packages/postfix/html
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/packages/postfix/samples
readme_directory = /usr/share/doc/packages/postfix/README_FILES
inet_protocols = all
biff = no
mail_spool_directory = /var/mail
canonical_maps = hash:/etc/postfix/canonical
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_alias_domains = hash:/etc/postfix/virtual
relocated_maps = hash:/etc/postfix/relocated
transport_maps = hash:/etc/postfix/transport
sender_canonical_maps = hash:/etc/postfix/sender_canonical
masquerade_exceptions = root
masquerade_classes = envelope_sender, header_sender, header_recipient
myhostname = opensuse.org
program_directory = /usr/lib/postfix
inet_interfaces = localhost
masquerade_domains =
mydestination = $myhostname,localhost.$mydomain,$mydomain
defer_transports =
mynetworks_style = subnet
disable_dns_lookups = no
relayhost = [smtp-msa.orange.fr]:587
mailbox_command =
mailbox_transport =
strict_8bitmime = no
disable_mime_output_conversion = no
smtpd_sender_restrictions = hash:/etc/postfix/access
smtpd_client_restrictions =
smtpd_helo_required = no
smtpd_helo_restrictions =
strict_rfc821_envelopes = no
smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination
smtp_sasl_auth_enable = yes
smtpd_sasl_auth_enable = no
smtpd_use_tls = no
smtp_use_tls = no
alias_maps = hash:/etc/aliases
mailbox_size_limit = 0
message_size_limit = 10240000
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_type = cyrus

Is there some value wrong ?

pc54g2 wrote:
> Thanks,
>
> the value -smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd- was
> already existing in main.cf and I had to create -smtp_sasl_type =
> cyrus-
>
> sasl_passwd contains this :
>
>
> Code:
> --------------------
> [smtp-msa.orange.fr]:587 mylogin:mypasswd
> --------------------

Looks alright to me.

> --------------------
> Diagnostic-Code: smtp; 554 <myadress@yahoo.fr>: Recipient address rejected:Missing Authentication
> --------------------
…]
> relayhost = [smtp-msa.orange.fr]:587

$telnet smtp-msa.orange.fr 587
telnet: smtp-msa.orange.fr: Name or service not known
smtp-msa.orange.fr: Unknown host

Are you sure about this mailserver?

> Is there some value wrong ?

Doesn’t appear to (apart from the hostname of the mailserver).
What does the Postfix log say when you try to deliver mail? Use more
verbosity if needed in master.cf.
smtp unix - - n - - smtp -v

[excuse me for talking to myself]

LittleRedRooster wrote:
> Are you sure about this mailserver?

Btw:

$dig -t mx orange.fr +short
10 smtp-in.orange.fr.

$telnet smtp-in.orange.fr 587
Trying 80.12.242.82…
Connected to smtp-in.orange.fr.
Escape character is ‘^]’.
220 mwinf2724.orange.fr ESMTP ABO **************************
quit
221 Bye

So try smtp-in.orange.fr instead of smtp-msa.orange.fr

Are you sure about this mailserver?

I think this is the good smtp parameter

Translation of this webpage Orange :

Orange is developing a new technical solution for sending messages provides authentication of the sender.
The implementation of this solution requires a reconfiguration of your mailer. It is necessary to:

  • Change the address of the sending server: SMTP-msa.orange.fr instead of smtp.orange.fr,
  • Change the port used by sending: 587 instead of 25,
  • Enable authentication.

After having used the mailx -v option :

cat /var/log/mail.warn

Sep 20 10:23:24 linux-0ew4 postfix/smtp[6693]: warning: database /etc/postfix/sasl_passwd.db is older than source file /etc/postfix/sasl_passwd

cat /var/log/mail

Sep 20 10:23:24 linux-0ew4 postfix/pickup[6456]: A0C1640254: uid=1000 from=<laza>
Sep 20 10:23:24 linux-0ew4 postfix/cleanup[6691]: A0C1640254: message-id=<20080920082324.A0C1640254@opensuse.org>
Sep 20 10:23:24 linux-0ew4 postfix/qmgr[4839]: A0C1640254: from=<laza@opensuse.org>, size=438, nrcpt=2 (queue active)
Sep 20 10:23:24 linux-0ew4 postfix/smtp[6693]: warning: database /etc/postfix/sasl_passwd.db is older than source file /etc/postfix/sasl_passwd
Sep 20 10:23:25 linux-0ew4 postfix/local[6694]: A0C1640254: to=<Test@opensuse.org>, orig_to=<Test>, relay=local, delay=0.52, delays=0.25/0.08/0/0.18, dsn=5.1.1, status=bounced (unknown user: "test")
Sep 20 10:23:25 linux-0ew4 postfix/smtp[6693]: A0C1640254: to=<myadress@yahoo.fr>, relay=smtp-msa.orange.fr[193.252.22.72]:587, delay=0.93, delays=0.25/0.18/0.34/0.15, dsn=5.0.0, status=bounced (host smtp-msa.orange.fr[193.252.22.72] said: 554 <myadress@yahoo.fr>: Recipient address rejected: Missing Authentication (in reply to RCPT TO command))
Sep 20 10:23:25 linux-0ew4 postfix/cleanup[6691]: 7EB5F40256: message-id=<20080920082325.7EB5F40256@opensuse.org>
Sep 20 10:23:25 linux-0ew4 postfix/bounce[6695]: A0C1640254: sender non-delivery notification: 7EB5F40256
Sep 20 10:23:25 linux-0ew4 postfix/qmgr[4839]: 7EB5F40256: from=<>, size=2550, nrcpt=1 (queue active)
Sep 20 10:23:25 linux-0ew4 postfix/qmgr[4839]: A0C1640254: removed
Sep 20 10:23:25 linux-0ew4 postfix/local[6694]: 7EB5F40256: to=<laza@opensuse.org>, relay=local, delay=0.11, delays=0.05/0/0/0.06, dsn=2.0.0, status=sent (delivered to mailbox)
Sep 20 10:23:25 linux-0ew4 postfix/qmgr[4839]: 7EB5F40256: removed

So try smtp-in.orange.fr instead of smtp-msa.orange.fr

I replaced the values relayhost = [smtp-msa.orange.fr]:587 in main.cf and sasl-passwd with relayhost = [smtp-in.orange.fr]:587 but it does not change anything

Sep 20 10:36:50 linux-0ew4 postfix/pickup[6932]: 9BBF440254: uid=1000 from=<laza>
Sep 20 10:36:50 linux-0ew4 postfix/cleanup[6943]: 9BBF440254: message-id=<20080920083650.9BBF440254@opensuse.org>
Sep 20 10:36:50 linux-0ew4 postfix/qmgr[6933]: 9BBF440254: from=<laza@opensuse.org>, size=421, nrcpt=1 (queue active)
Sep 20 10:36:51 linux-0ew4 postfix/smtp[6945]: 9BBF440254: to=<myadress@yahoo.fr>, relay=smtp-in.orange.fr[80.12.242.9]:587, delay=0.64, delays=0.09/0/0.41/0.14, dsn=5.0.0, status=bounced (host smtp-in.orange.fr[80.12.242.9] said: 554 <myadress@yahoo.fr>: Recipient address rejected: Missing Authentication (in reply to RCPT TO command))
Sep 20 10:36:51 linux-0ew4 postfix/cleanup[6943]: 4843840256: message-id=<20080920083651.4843840256@opensuse.org>
Sep 20 10:36:51 linux-0ew4 postfix/bounce[6947]: 9BBF440254: sender non-delivery notification: 4843840256
Sep 20 10:36:51 linux-0ew4 postfix/qmgr[6933]: 4843840256: from=<>, size=2300, nrcpt=1 (queue active)
Sep 20 10:36:51 linux-0ew4 postfix/qmgr[6933]: 9BBF440254: removed
Sep 20 10:36:51 linux-0ew4 postfix/local[6946]: 4843840256: to=<laza@opensuse.org>, relay=local, delay=0.08, delays=0.04/0/0/0.04, dsn=2.0.0, status=sent (delivered to mailbox)
Sep 20 10:36:51 linux-0ew4 postfix/qmgr[6933]: 4843840256: removed

From MAILER-DAEMON Sat Sep 20 10:36:51 2008
Return-Path: <>
X-Original-To: laza@opensuse.org
Delivered-To: laza@opensuse.org
Received: by opensuse.org (Postfix)
id 4843840256; Sat, 20 Sep 2008 10:36:51 +0200 (CEST)
Date: Sat, 20 Sep 2008 10:36:51 +0200 (CEST)
From: MAILER-DAEMON@opensuse.org (Mail Delivery System)
Subject: Undelivered Mail Returned to Sender
To: laza@opensuse.org
Auto-Submitted: auto-replied
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
boundary=“9BBF440254.1221899811/opensuse.org”
Message-Id: <20080920083651.4843840256@opensuse.org>

This is a MIME-encapsulated message.

–9BBF440254.1221899811/opensuse.org
Content-Description: Notification
Content-Type: text/plain; charset=us-ascii

This is the mail system at host opensuse.org.

I’m sorry to have to inform you that your message could not
be delivered to one or more recipients. It’s attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

               The mail system

<myadress@yahoo.fr>: host smtp-in.orange.fr[80.12.242.9] said: 554
<myadress@yahoo.fr>: Recipient address rejected: Missing Authentication
(in reply to RCPT TO command)

–9BBF440254.1221899811/opensuse.org
Content-Description: Delivery report
Content-Type: message/delivery-status

Reporting-MTA: dns; opensuse.org
X-Postfix-Queue-ID: 9BBF440254
X-Postfix-Sender: rfc822; laza@opensuse.org
Arrival-Date: Sat, 20 Sep 2008 10:36:50 +0200 (CEST)

Final-Recipient: rfc822; myadress@yahoo.fr
Action: failed
Status: 5.0.0
Remote-MTA: dns; smtp-in.orange.fr
Diagnostic-Code: smtp; 554 <myadress@yahoo.fr>: Recipient address rejected:Missing Authentication

–9BBF440254.1221899811/opensuse.org
Content-Description: Undelivered Message
Content-Type: message/rfc822

Received: by opensuse.org (Postfix, from userid 1000)
id 9BBF440254; Sat, 20 Sep 2008 10:36:50 +0200 (CEST)
Date: Sat, 20 Sep 2008 10:36:50 +0200
To: myadress@yahoo.fr
Subject: Test
User-Agent: Heirloom mailx 12.2 01/07/07
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <20080920083650.9BBF440254@opensuse.org>
From: laza@opensuse.org (laza)

OK

–9BBF440254.1221899811/opensuse.org–

A practical suggestion: Use a mail client like Thunderbird to debug the authentication and get it working before you try it with postfix. From what orange is saying, you should use a different server and port, and there is no encryption needed but authentication is needed.

Ok, good idea.

Otherwise, couldn’t it be the name of the “user agent” : “Heirloom mailx 12.2 01/07/07” which is not recognized by the server ? if right, is it possible to modify this name, using for example the name “Mozilla Thunderbird” ?

I ask this because I think to an equivalent thing when we try to post data with curl on some websites which need authentification of the browser (option curl -A)

I don’t think the mail agent would have anything to do with it, as your ISP would have to deal with all sorts of mail agents from clients. As for the username, in Thunderbird you can specify the username that is sent to the SMTP server and it will prompt you for the password. My guess is it would be the same password you use to fetch your mail from your ISP’s POP3 or IMAP server.

pc54g2 wrote:
> Are you sure about this mailserver?
>
> I think this is the good smtp parameter
>
> Translation of this webpage ‘Orange’ (http://tinyurl.com/ynpclc) :
>
>> Orange is developing a new technical solution for sending messages
>> provides authentication of the sender.
>> The implementation of this solution requires a reconfiguration of your
>> mailer. It is necessary to:
>> - Change the address of the sending server: SMTP-msa.orange.fr instead
>> of smtp.orange.fr,
>> - Change the port used by sending: 587 instead of 25,
>> - Enable authentication.

Ok, strange that this host didn’t respond from here.

> Sep 20 10:23:24 linux-0ew4 postfix/smtp[6693]: warning: database /etc/postfix/sasl_passwd.db is older than source file /etc/postfix/sasl_passwd

Check sasl_passwd and do a postmap /etc/postfix/sasl_passwd first.

LittleRedRooster schrieb:
> pc54g2 wrote:
>> Translation of this webpage ‘Orange’ (http://tinyurl.com/ynpclc) :
>>
>>> Orange is developing a new technical solution for sending messages
>>> provides authentication of the sender.
>>> The implementation of this solution requires a reconfiguration of your
>>> mailer. It is necessary to:
>>> - Change the address of the sending server: SMTP-msa.orange.fr instead
>>> of smtp.orange.fr,
>>> - Change the port used by sending: 587 instead of 25,
>>> - Enable authentication.
>
> Ok, strange that this host didn’t respond from here.

It’s probably only reachable from inside the Orange customer network.
Would make sense for an MSA server.

>> Sep 20 10:23:24 linux-0ew4 postfix/smtp[6693]: warning: database /etc/postfix/sasl_passwd.db is older than source file /etc/postfix/sasl_passwd
>
> Check sasl_passwd and do a postmap /etc/postfix/sasl_passwd first.

My thought, too.


Tilman Schmidt
Phoenix Software GmbH
Bonn, Germany

Hi,

Check sasl_passwd and do a postmap /etc/postfix/sasl_passwd first.

here is what I tried :

I’ve first opened /etc/postfix/sasl_passwd without modifing anything in this file, and I’ve just saved the document. Nothing really important…
Then, I made postmap /etc/postfix/sasl_passwd and postfix reload in a root’s shell

I wrote echo “OK”| mailx -s “Test” myadress@yahoo.fr and I’ve immediatly received the mail. Idem with my another email (Orange)

So it seems everything works fine now. Thank you.

Strange, isn’t it ?

pc54g2 wrote:
> Hi,
>
>> Check sasl_passwd and do a postmap /etc/postfix/sasl_passwd first.
>
> here is what I tried :
>
> I’ve first opened -/etc/postfix/sasl_passwd- without modifing anything
> in this file, and I’ve just saved the document. Nothing really
> important…

Next time if you want to debug a Postfix db file, do:
postmap -q key database-file

E.g.
$sudo postmap -q “xs4all.nl” /etc/postfix/transport
smtp:localhost:465

You will see immediately if a key is present in a db file.

> Then, I made postmap -/etc/postfix/sasl_passwd- and -postfix reload- in
> a root’s shell
>
> I wrote -echo “OK”| mailx -s “Test” myadress@yahoo.fr- and I’ve
> immediatly received the mail. Idem with my another email (Orange)
>
> So it seems everything works fine now. Thank you.

Good to hear.

> Strange, isn’t it ?

/me flips through the BOFH excuse rolodex
(http://pages.cs.wisc.edu/~ballard/bofh/bofhserver.pl).

The cause of the problem is:
Your EMAIL is now being delivered by the USPS.

Hi,

mailx does not work again since i’ve installed openSUSE 11.1. I take the same parameters as described in this thread :

main.cf

readme_directory = /usr/share/doc/packages/postfix-doc/README_FILES
inet_protocols = all
biff = no
mail_spool_directory = /var/mail
canonical_maps = hash:/etc/postfix/canonical
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_alias_domains = hash:/etc/postfix/virtual
relocated_maps = hash:/etc/postfix/relocated
transport_maps = hash:/etc/postfix/transport
sender_canonical_maps = hash:/etc/postfix/sender_canonical
masquerade_exceptions = root
masquerade_classes = envelope_sender, header_sender, header_recipient

myhostname = linux-enr1.site

myhostname = opensuse.org
delay_warning_time = 1h
message_strip_characters = \0
program_directory = /usr/lib/postfix
inet_interfaces = localhost
masquerade_domains =
mydestination = $myhostname, localhost.$mydomain
defer_transports =
mynetworks_style = subnet
disable_dns_lookups = no
relayhost = [smtp-msa.orange.fr]:587
mailbox_command =
mailbox_transport =
strict_8bitmime = no
disable_mime_output_conversion = no
smtpd_sender_restrictions = hash:/etc/postfix/access
smtpd_client_restrictions =
smtpd_helo_required = no
smtpd_helo_restrictions =
strict_rfc821_envelopes = no
smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination
smtp_sasl_auth_enable = yes
smtpd_sasl_auth_enable = no
smtpd_use_tls = no
smtp_use_tls = no
alias_maps = hash:/etc/aliases
mailbox_size_limit = 0
message_size_limit = 10240000

smtp_sasl_password_maps = hash:/etc/postfix/sasl_client

smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_type = cyrus

and in sasl_paswd

[193.252.22.72]:587 id:paswd

then I make postmap /etc/postfix/sasl_passwd and postfix reload but error message while trying to send a mail to my wanadoo adress

Final-Recipient: rfc822; myadress@wanadoo.fr
Action: failed
Status: 5.0.0
Remote-MTA: dns; smtp-msa.orange.fr
Diagnostic-Code: smtp; 554 <myadress@wanadoo.fr>: Recipient address
rejected: Missing Authentication

Anyone has got an idea ? I don’t understand why it does not work with exactly the same configuration…