New install - Temporary lookup failures when trying to send

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

New install - Temporary lookup failures when trying to send

James Brown
I’m trying to set up a new mail server on macOS Mojave and it almost works. Dovecot for IMAP is working.

But when I try to send a message I get:

Escape character is '^]'.
220 mail.bordo.com.au ESMTP Postfix
MAIL FROM: <[hidden email]>
250 2.1.0 Ok
RCPT TO: <[hidden email]>
451 4.3.0 <[hidden email]>: Temporary lookup failure

Config:

$ postconf -n
broken_sasl_auth_clients = yes
command_directory = /usr/local/sbin
compatibility_level = 2
daemon_directory = /usr/local/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 7
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
default_process_limit = 100
disable_vrfy_command = yes
dovecot_destination_recipient_limit = 1
html_directory = no
inet_protocols = ipv4
mail_owner = _postfix
mailbox_size_limit = 102400000
mailq_path = /usr/local/bin/mailq
manpage_directory = /usr/local/man
message_size_limit = 102400000
meta_directory = /usr/local/etc/postfix
mydomain = bordo.com.au
myhostname = mail.bordo.com.au
newaliases_path = /usr/local/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = no
sample_directory = /usr/local/etc/postfix
sendmail_path = /usr/local/sbin/sendmail
setgid_group = _postdrop
shlib_directory = no
smtpd_client_connection_count_limit = 100
smtpd_command_filter = pcre:/etc/postfix/command_filter.regex
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_enforce_tls = no
smtpd_etrn_restrictions = reject
smtpd_helo_required = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_pipelining, reject_unauth_destination, permit
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_tls_cert_file = /usr/local/etc/dovecot/mail.bordo.com.au.pem
smtpd_tls_key_file = /usr/local/etc/dovecot/mail.bordo.com.au.pem
smtpd_tls_loglevel = 1
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
transport_maps = hash:/usr/local/etc/postfix/transport
unknown_local_recipient_reject_code = 550
vacation_destination_recipient_limit = 1
virtual_alias_maps = mysql:/usr/local/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:102
virtual_mailbox_base = /usr/local/virtual/
virtual_mailbox_domains = mysql:/usr/local/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_limit = 512000000
virtual_mailbox_maps = mysql:/usr/local/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 102
virtual_transport = dovecot
virtual_uid_maps = static:102


Mailboxes are stored in MySQL.

I have in main.cf:

dovecot unix - n n - - pipe
  flags=DRhu user=_vmail argv=/usr/local/libexec/dovecot/deliver -f ${sender} -d ${recipient}

Not sure where I’ve gone wrong. Copied most config details across from my working (older) mail server.

Any suggestions where I should look? Anything wrong with the above configuration? 

Thanks in advance,

James.
Reply | Threaded
Open this post in threaded view
|

Re: New install - Temporary lookup failures when trying to send

Matus UHLAR - fantomas
On 03.12.18 12:31, James Brown wrote:

>I’m trying to set up a new mail server on macOS Mojave and it almost works. Dovecot for IMAP is working.
>
>But when I try to send a message I get:
>
>Escape character is '^]'.
>220 mail.bordo.com.au <http://mail.bordo.com.au/> ESMTP Postfix
>HELO me.bordo.com.au <http://me.bordo.com.au/>
>250 mail.bordo.com.au <http://mail.bordo.com.au/>
>MAIL FROM: <[hidden email] <mailto:[hidden email]>>
>250 2.1.0 Ok
>RCPT TO: <[hidden email] <mailto:[hidden email]>>
>451 4.3.0 <[hidden email] <mailto:[hidden email]>>: Temporary lookup failure

pleaase, get a decent MUA, not applemail that tries to encode everything as
internet links (and messes up thge plaintext version of mail).

>Config:
>
>$ postconf -n

>mydomain = bordo.com.au <http://bordo.com.au/>
>myhostname = mail.bordo.com.au <http://mail.bordo.com.au/>

so bordo.com.au is to be handled locally.

>virtual_alias_maps = mysql:/usr/local/etc/postfix/mysql_virtual_alias_maps.cf
>virtual_mailbox_domains = mysql:/usr/local/etc/postfix/mysql_virtual_domains_maps.cf
>virtual_mailbox_maps = mysql:/usr/local/etc/postfix/mysql_virtual_mailbox_maps.cf

this looks like mysql lookups are failing with temporary errors.
Are those cf files properly configured? Can postfix connect to the database?
What's in the logs?

>Not sure where I’ve gone wrong. Copied most config details across from my working (older) mail server.

often not a good idea, your postfix config file has too many options where I
believe many could be left default.

--
Matus UHLAR - fantomas, [hidden email] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Boost your system's speed by 500% - DEL C:\WINDOWS\*.*
Reply | Threaded
Open this post in threaded view
|

Re: New install - Temporary lookup failures when trying to send

Wietse Venema
In reply to this post by James Brown
James Brown:

> I?m trying to set up a new mail server on macOS Mojave and it almost works. Dovecot for IMAP is working.
>
> But when I try to send a message I get:
>
> Escape character is '^]'.
> 220 mail.bordo.com.au <http://mail.bordo.com.au/> ESMTP Postfix
> HELO me.bordo.com.au <http://me.bordo.com.au/>
> 250 mail.bordo.com.au <http://mail.bordo.com.au/>
> MAIL FROM: <[hidden email] <mailto:[hidden email]>>
> 250 2.1.0 Ok
> RCPT TO: <[hidden email] <mailto:[hidden email]>>
> 451 4.3.0 <[hidden email] <mailto:[hidden email]>>: Temporary lookup failure
>

Before replying with 'Temporary lookup failure', Postfix will log
the details to the log. Such information must not be revealed to
clients, but it needs to be available for trouble shooting.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: New install - Temporary lookup failures when trying to send

@lbutlr
In reply to this post by Matus UHLAR - fantomas
On Mon Dec 03 2018 04:27:43 Matus UHLAR - fantomas <[hidden email]> said:
>
> pleaase, get a decent MUA, not applemail that tries to encode everything as
> internet links (and messes up thge plaintext version of mail).

What do you base this statement on? I’ve been using Apple’s Meal.app since around 2003 or so, and I’ve never had it encode everything as Internet links more mess up plaintext mail.

--
"A musicologist is a man who can read music but can't hear it." -  Sir
Thomas Beecham (1879 - 1961)

Reply | Threaded
Open this post in threaded view
|

Re: New install - Temporary lookup failures when trying to send

Larry Stone

> On Dec 4, 2018, at 2:47 PM, @lbutlr <[hidden email]> wrote:
>
> On Mon Dec 03 2018 04:27:43 Matus UHLAR - fantomas <[hidden email]> said:
>>
>> pleaase, get a decent MUA, not applemail that tries to encode everything as
>> internet links (and messes up thge plaintext version of mail).
>
> What do you base this statement on? I’ve been using Apple’s Meal.app since around 2003 or so, and I’ve never had it encode everything as Internet links more mess up plaintext mail.


Agree. I’ve been using Apple Mail for many years as well and never seen it do that either. This email was sent by Apple Mail and I don’t believe you’ll see anything weird done to it.

--
Larry Stone
[hidden email]





Reply | Threaded
Open this post in threaded view
|

Re: New install - Temporary lookup failures when trying to send

Bill Cole-3
In reply to this post by James Brown
On 2 Dec 2018, at 20:31, James Brown wrote:

> I’m trying to set up a new mail server on macOS Mojave and it almost
> works. Dovecot for IMAP is working.

This is a bad idea. Mojave (like High Sierra and Sierra before it) is
unfit for server duty due to the intentional mangling of logging by
Apple. Without proper logs, detecting subtle problems is difficult and
troubleshooting any blatant problem like this is impossible.

You can get something like a proper mail log by running this command
persistently (i.e. using launchd or batch or whatever else works...)

    log stream --info --predicate 'senderImagePath CONTAINS "postfix"'
--style syslog >> /var/log/mail.log

That will give you useful information in a standard-ish format in
/var/log/mail.log.

Without such logging, it is infeasible to troubleshoot your problem.


> But when I try to send a message I get:
>
> Escape character is '^]'.
> 220 mail.bordo.com.au <http://mail.bordo.com.au/> ESMTP Postfix
> HELO me.bordo.com.au <http://me.bordo.com.au/>
> 250 mail.bordo.com.au <http://mail.bordo.com.au/>
> MAIL FROM: <[hidden email] <mailto:[hidden email]>>
> 250 2.1.0 Ok
> RCPT TO: <[hidden email] <mailto:[hidden email]>>
> 451 4.3.0 <[hidden email] <mailto:[hidden email]>>:
> Temporary lookup failure

Hopefully all those 'mailto:' and 'http:' links are just some artifact
of how you composed your message. If you're actually sending those to
Postfix, I'm shocked that it even tried to work with them...

It is helpful when posting here to do so in plain text format. I'm sure
Apple Mail can do that, because others here do it all the time.

[...]
>
> Mailboxes are stored in MySQL.

Which is PROBABLY where the failure is. Postfix can't look up the
recipient.

Details of that failure could be in your logs on a server with a sane
logging subsystem (e.g. MacOS before Sierra or anything else Postfix
runs on...) You don't really have logs, because Apple does not want
anyone to have logs. Even with the command I give above, you're going to
get a slightly odd log massaged by both the new broken "unified logging"
subsystem and by the 'log' program that extracts messages back out of
that subsystem for formatting. There is not yet an adequate history of
running Postfix (or any portable server software) on modern macOS for
there to be any real confidence in the logging workaround.


--
Bill Cole
[hidden email] or [hidden email]
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Available For Hire: https://linkedin.com/in/billcole
Reply | Threaded
Open this post in threaded view
|

Re: New install - Temporary lookup failures when trying to send

Matus UHLAR - fantomas
In reply to this post by @lbutlr
>On Mon Dec 03 2018 04:27:43 Matus UHLAR - fantomas <[hidden email]> said:
>> pleaase, get a decent MUA, not applemail that tries to encode everything as
>> internet links (and messes up thge plaintext version of mail).

On 04.12.18 13:47, @lbutlr wrote:
>What do you base this statement on?  I’ve been using Apple’s Meal.app since
> around 2003 or so, and I’ve never had it encode everything as Internet
> links more mess up plaintext mail.

based on sender's

X-Mailer: Apple Mail (2.3445.102.3)

and the result I have quoted that is also visible on:

https://marc.info/?l=postfix-users&m=154380074926895&w=2

the HTML parts may be encoded properly, but the plaintext version of sent
mail contains useless crap where

<[hidden email]>

is converted to:

<[hidden email] <mailto:[hidden email]>>

and:

mail.bordo.com.au

is converted to:

mail.bordo.com.au <http://mail.bordo.com.au/>


--
Matus UHLAR - fantomas, [hidden email] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
LSD will make your ECS screen display 16.7 million colors
Reply | Threaded
Open this post in threaded view
|

Re: New install - Temporary lookup failures when trying to send

Larry Stone

> On Dec 6, 2018, at 3:00 AM, Matus UHLAR - fantomas <[hidden email]> wrote:
>
>> On Mon Dec 03 2018 04:27:43 Matus UHLAR - fantomas <[hidden email]> said:
>>> pleaase, get a decent MUA, not applemail that tries to encode everything as
>>> internet links (and messes up thge plaintext version of mail).
>
> On 04.12.18 13:47, @lbutlr wrote:
>> What do you base this statement on?  I’ve been using Apple’s Meal.app since
>> around 2003 or so, and I’ve never had it encode everything as Internet
>> links more mess up plaintext mail.
>
> based on sender's
> X-Mailer: Apple Mail (2.3445.102.3)
>
> and the result I have quoted that is also visible on:
>
> https://marc.info/?l=postfix-users&m=154380074926895&w=2
>
> the HTML parts may be encoded properly, but the plaintext version of sent
> mail contains useless crap where
>
> <[hidden email]>
>
> is converted to:
>
> <[hidden email] <mailto:[hidden email]>>
>
> and:
>
> mail.bordo.com.au
>
> is converted to:
>
> mail.bordo.com.au <http://mail.bordo.com.au/>

That does not appear to be the standard Apple Mail. I am running MacOS 10.14.1 (the latest until 10.14.2 was released yesterday) and I have
Mime-Version: 1.0 (Mac OS X Mail 12.1 \(3445.101.1\))
X-Mailer: Apple Mail (2.3445.101.1)

while [hidden email] has
Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\))
X-Mailer: Apple Mail (2.3445.102.3)

It’s possible that’s a new version included with 10.14.2 but Mr. Brown sent his message four days ago and 10.14.2 was released yesterday (he might have been running a pre-release version). It’s possible that however he pasted that into his message did that. It’s also possible that something downline of Mr. Brown at bordo.com.au is changing the message, converting it to multi-part, and adding that crap. I do note in the headers of his message that there are a bunch related to an anti-spam product called ASSP. I’ve never heard of it before and have no idea if it has that capability.
X-Assp-Version: 2.6.2(18328) on mail.bordo.com.au
X-Assp-ID: mail.bordo.com.au id-00682-15042
X-Assp-Session: 7FB04622FB68 (mail 1)
X-Assp-Envelope-From: [hidden email]
X-Assp-Intended-For: [hidden email]
X-Assp-Client-SSL: yes
X-Assp-Server-TLS: yes

In any event, unless I’m missing it, the version I and most everyone else has of Apple Mail does not do that. I’ve sent a test message to myself with HTML included and there was no conversion of links. And this message was sent with Apple Mail.

--
Larry Stone
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: New install - Temporary lookup failures when trying to send

Matus UHLAR - fantomas
>>> On Mon Dec 03 2018 04:27:43 Matus UHLAR - fantomas <[hidden email]> said:
>>>> pleaase, get a decent MUA, not applemail that tries to encode everything as
>>>> internet links (and messes up thge plaintext version of mail).

>> On Dec 6, 2018, at 3:00 AM, Matus UHLAR - fantomas <[hidden email]> wrote:
>> X-Mailer: Apple Mail (2.3445.102.3)

On 06.12.18 07:56, Larry Stone wrote:
>That does not appear to be the standard Apple Mail.  I am running MacOS
> 10.14.1 (the latest until 10.14.2 was released yesterday) and I have
>Mime-Version: 1.0 (Mac OS X Mail 12.1 \(3445.101.1\))
>X-Mailer: Apple Mail (2.3445.101.1)
>
>while [hidden email] has
>Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\))
>X-Mailer: Apple Mail (2.3445.102.3)

I see @lbutlr has the same version:

X-Mailer: Apple Mail (2.3445.102.3)

although no Mime-Version: header.

> It’s possible that’s a new version included with 10.14.2 but Mr.  Brown
> sent his message four days ago and 10.14.2 was released yesterday (he
> might have been running a pre-release version).  It’s possible that
> however he pasted that into his message did that.  It’s also possible that
> something downline of Mr.  Brown at bordo.com.au is changing the message,
> converting it to multi-part, and adding that crap.  I do note in the
> headers of his message that there are a bunch related to an anti-spam
> product called ASSP.  I’ve never heard of it before and have no idea if it
> has that capability.

>X-Assp-Version: 2.6.2(18328) on mail.bordo.com.au
>X-Assp-ID: mail.bordo.com.au id-00682-15042
>X-Assp-Session: 7FB04622FB68 (mail 1)
>X-Assp-Envelope-From: [hidden email]
>X-Assp-Intended-For: [hidden email]
>X-Assp-Client-SSL: yes
>X-Assp-Server-TLS: yes
>
>In any event, unless I’m missing it, the version I and most everyone else
> has of Apple Mail does not do that.  I’ve sent a test message to myself
> with HTML included and there was no conversion of links.  And this message
> was sent with Apple Mail.

This and @lbutlr mail were plaintext-only. Maybe multipart mail has them encoded in plaintext versions?

Anyway, sorry for the noise.

however, my questions weren't responded and still apply:

>>>> Are those cf files properly configured? Can postfix connect to the database?
>>>> What's in the logs?

and also the comment:

>>>>> Not sure where I’ve gone wrong. Copied most config details across from my working (older) mail server.
>>>>
>>>> often not a good idea, your postfix config file has too many options where I
>>>> believe many could be left default.

--
Matus UHLAR - fantomas, [hidden email] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Christian Science Programming: "Let God Debug It!".
Reply | Threaded
Open this post in threaded view
|

Re: New install - Temporary lookup failures when trying to send

@lbutlr
In reply to this post by Bill Cole-3
On 5 Dec 2018, at 07:34, Bill Cole <[hidden email]> wrote:
> On 2 Dec 2018, at 20:31, James Brown wrote:
>
>> I’m trying to set up a new mail server on macOS Mojave and it almost works. Dovecot for IMAP is working.
>
> This is a bad idea. Mojave (like High Sierra and Sierra before it) is unfit for server duty due to the intentional mangling of logging by Apple. Without proper logs, detecting subtle problems is difficult and troubleshooting any blatant problem like this is impossible.

Apple's logging is not mangled, it is simply using a different logging method. All the information is there, it's just harder (well, harder for me) to get to. However, you can easily do some pretty complex queries against it (as I understand it).

But I thought we were talking about Apple Mail.app *sending* mail?

> You can get something like a proper mail log by running this command persistently (i.e. using launchd or batch or whatever else works...)
>
>   log stream --info --predicate 'senderImagePath CONTAINS "postfix"' --style syslog >> /var/log/mail.log
>
> That will give you useful information in a standard-ish format in /var/log/mail.log.
>
> Without such logging, it is infeasible to troubleshoot your problem.

Well, it is feasible because you can query the logs anytime you want (using collect will even generate a log file for your query across the whole logging system without having to go searching trough many files). That said, I don't use my Macs as servers. postfix runs on FreeBSD. Apache runs on FreeBSD. MySQL runs on FreeBSD. Etc.

# log show --info  --start "2018-12-06 16:00:00" --end "2018-12-06 16:45:00" --predicate 'senderImagePath CONTAINS "sshd" AND messageType=info' --style syslog
Filtering the log data using "senderImagePath CONTAINS "sshd" AND logType == 1"
Timestamp                       (process)[PID]    
2018-12-06 16:17:28.311749-0700  localhost sshd[1649]: Connection closed by 130.162.96.208 port 18696 [preauth]
2018-12-06 16:20:14.692208-0700  localhost sshd[1822]: Did not receive identification string from 63.143.42.244 port 10643
2018-12-06 16:25:14.528760-0700  localhost sshd[2100]: Did not receive identification string from 63.143.42.244 port 17916
2018-12-06 16:30:14.586075-0700  localhost sshd[2378]: Did not receive identification string from 63.143.42.244 port 33134



--
A bartender is just a pharmacist with a limited inventory.


Reply | Threaded
Open this post in threaded view
|

Re: New install - Temporary lookup failures when trying to send

@lbutlr
In reply to this post by Matus UHLAR - fantomas


> On 6 Dec 2018, at 02:00, Matus UHLAR - fantomas <[hidden email]> wrote:
>
>> On Mon Dec 03 2018 04:27:43 Matus UHLAR - fantomas <[hidden email]> said:
>>> pleaase, get a decent MUA, not applemail that tries to encode everything as
>>> internet links (and messes up thge plaintext version of mail).
>
> On 04.12.18 13:47, @lbutlr wrote:
>> What do you base this statement on?  I’ve been using Apple’s Meal.app since
>> around 2003 or so, and I’ve never had it encode everything as Internet
>> links more mess up plaintext mail.
>
> based on sender's
> X-Mailer: Apple Mail (2.3445.102.3)
>
> and the result I have quoted that is also visible on:
>
> https://marc.info/?l=postfix-users&m=154380074926895&w=2
>
> the HTML parts may be encoded properly, but the plaintext version of sent
> mail contains useless crap where
>
> <[hidden email]>
>
> is converted to:
>
> <[hidden email] <mailto:[hidden email]>>
>
> and:
>
> mail.bordo.com.au
>
> is converted to:
>
> mail.bordo.com.au <http://mail.bordo.com.au/>

But I have never seen Mail.app (neither my own nor someone else's) do that.

It is far more likely that the problem lies in something the poster has done than in a program used by about a billion people across macOS and iOS.

--
THERE WAS NO ROMAN GOD NAMED "FARTICUS" Bart chalkboard Ep. 5F06

Reply | Threaded
Open this post in threaded view
|

Re: New install - Temporary lookup failures when trying to send

James Brown
In reply to this post by Matus UHLAR - fantomas

> On 7 Dec 2018, at 1:23 am, Matus UHLAR - fantomas <[hidden email]> wrote:
>
> Anyway, sorry for the noise.
>
> however, my questions weren't responded and still apply:
>
>>>>> Are those cf files properly configured? Can postfix connect to the database?
>>>>> What's in the logs?
>
> and also the comment:
>
>>>>>> Not sure where I’ve gone wrong. Copied most config details across from my working (older) mail server.
>>>>> often not a good idea, your postfix config file has too many options where I
>>>>> believe many could be left default.


Wow, sorry to have caused such a kerfuffle with the email links!

I’m sending this one as Plain Text just to be sure. :-)

Yes, I’m using ASSP as an anti-spam mail proxy - https://sourceforge.net/projects/assp/

Anyway, I eventually got it working. I think the problem was that I did not have:

mysql_virtual_alias_maps.cf and
mysql_virtual_domains_maps.cf

In /usr/local/etc/postfix/ - once I put them it I think it worked. It’s all good now.

Thanks again everyone for your help.

James.