Viktor Dukhovni <[email protected]> writes:
> On Mon, Jan 11, 2021 at 12:18:15PM -0500, Harry wrote:
>
>> Where can I find real examples of /etc/postfix/main.cf setup on host
>> with no resolvable FQDN relaying throu smtp Smarthost with
>> authentication?
>
> http://www.postfix.org/SOHO_README.html
> http://www.postfix.org/SOHO_README.html#fantasy
Thx, those are helpful but I'm appartently still not getting it
right. Still failing like so:
(This has been snipped from all lines below:
`Jan 14 15:28:54 localhost')
postfix/pickup[23288]: 40BBD492: uid=1000 from=<reader>
postfix/cleanup[23322]: 40BBD492: message-id=<20210114202854.40BBD492@localhost>
postfix/qmgr[23289]: 40BBD492: from=<[email protected]>, size=374, nrcpt=1
(queue active)
postfix/smtp[23324]: connect to smtp.newsguy.com[74.209.136.63]:25: Connection
timed out
postfix/smtp[23324]: 40BBD492: to=<[email protected]>, relay=none, delay=30,
delays=0.16/0.17/30/0, dsn=4.4.1, status=deferred (connect to
smtp.newsguy.com[74.209.136.63]:25: Connection timed out)
Does this line from above indicate that messages are still going out
with `from=<[email protected]> as sender from?
postfix/qmgr[23289]: 40BBD492: from=<[email protected]>, size=374, nrcpt=1
(queue active)
I ask because I do have a 'generic.db' file in place. (content of
generic file below)
[...]
> The "From:" header has no bearing on the return path of email,
> which comes from the message envelope. You can set with the
> "-f sender" option of sendmail(1).
Is that inserted somewhere in postfix configuration or done with
cmdline?
> the fate of the probe report is in your logs. If your system is
> configured to relay all mail to a smarthost, then that's where
> the notice would have been routed to. Actual delivery requires
> a working configuration.
>
> If you configure a domain for local delivery, and use an address
> in that domain as the envelope sender, then probe status reports
> will be delivered locally.
>
> mydestination = localhost.local
> $ sendmail -f [email protected] -bv [email protected]
Still not clear where the sendmail -f is done. The way you've written
the line ... with leading `$', it appear to be done on command line.
But clearly not something you would be doing with each mail... so
where is the sendmail -f line set?
I'm going to include my full main.cf, generic and munged sasl_passwd
since I'm not really clear what is supposed to be in there... I've
tried the generic file recommended at one of urls you suggested:
http://www.postfix.org/SOHO_README.html#fantasy
PS: /etc/postfix/generic and /etc/postfix/sasl_passwd have been
postmapped and postfix reloaded.
------- ------- ---=--- ------- -------
main.cf
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
readme_directory = no
# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
# fresh installs.
compatibility_level = 2
# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_security_level=may
smtp_tls_CApath=/etc/ssl/certs
smtp_tls_security_level=may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_generic_maps = hash:/etc/postfix/generic
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated
defer_unauth_destination
myhostname = localhost
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname **added hp( mailname = newsguy.com )
mydestination = local.lan, $myhostname, localhost, localhost.localdomain,
localhost
relayhost = [smtp.newsguy.com]
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
smtp_use_tls = yes
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
------- ------- ---=--- ------- -------
/etc/postfix/generic
## 4 /etc/postfix/generic:
## 5 [email protected] [email protected]
## 6 [email protected] [email protected]
## 7 @localdomain.local [email protected]
[email protected] [email protected]
------- ------- ---=--- ------- -------
/etc/postfix sasl_passwd
[smtp.newsguy.com] reader:XsecretX
------- ------- ---=--- ------- -------