"Is it possible to resend without all the html?" Oh boy, sorry about that, hope this is better
Hello, I'm just starting out with OpenBSD and I wanted to relay email with OpenSTMP. I was able to follow the example on the stmpd.conf man page: https://man.openbsd.org/smtpd.conf I got the relay working by following the first example and adding "user username" to the following line: action “relay” relay user username host smtp+tls://b...@smtp.example.com auth <secrets> where username is the name of a local user who had membership to the wheel group. It worked fine until late March. After that the smtpd.conf file started throwing a syntax error complaining about the addition I made above. smtpd -n was ok after user [username] was removed but the relay no longer functioned. The main cause seems to be a lack of authentication as I get a "mta error reason=AUTH rejected: 535 Authentication failed" when I try to send an email while running smtpd -dv. And the email lands in mailq and stays there: local# mailq 678f2f628b32567d|local|mta|auth|sen...@local.home.org|destinat...@example1.com|destinat...@example1.com|1554405322|1554405322|0|1|offline||Network error on destination MXs Here is an example of the output. There are three accounts involved: 1) the local user from above, usern...@local.home.org 2) username from the email provider, sen...@example0.co.jp 3) destination account: destinat...@example1.com Thank you local# smtpd -dv debug: init ssl-tree debug: init ca-tree debug: init ssl-tree debug: using "fs" queue backend debug: using "ramqueue" scheduler backend debug: using "ram" stat backend info: OpenSMTPD 6.4.0 starting debug: init ssl-tree debug: init ca-tree debug: init ssl-tree debug: using "fs" queue backend debug: using "ramqueue" scheduler backend debug: using "ram" stat backend debug: init ssl-tree debug: init ca-tree debug: init ssl-tree setup_peer: control -> klondike[11371] fd=4 debug: using "fs" queue backend debug: using "ramqueue" scheduler backend debug: using "ram" stat backend setup_peer: control -> lookup[8371] fd=5 setup_peer: lookup -> control[96994] fd=4 setup_peer: control -> pony express[25508] fd=6 setup_peer: control -> queue[54682] fd=7 setup_peer: control -> scheduler[41566] fd=8 setup_peer: lookup -> pony express[25508] fd=5 debug: init ssl-tree debug: init ca-tree debug: init ssl-tree debug: using "fs" queue backend debug: using "ramqueue" scheduler backend debug: using "ram" stat backend setup_peer: lookup -> queue[54682] fd=6 setup_peer: pony express -> control[96994] fd=4 setup_peer: pony express -> klondike[11371] fd=5 setup_peer: pony express -> lookup[8371] fd=6 setup_peer: pony express -> queue[54682] fd=7 debug: init ssl-tree debug: init ca-tree debug: init ssl-tree debug: using "fs" queue backend debug: using "ramqueue" scheduler backend debug: using "ram" stat backend setup_peer: queue -> control[96994] fd=4 setup_peer: queue -> pony express[25508] fd=5 setup_peer: queue -> lookup[8371] fd=6 debug: init ssl-tree debug: init ca-tree debug: init ssl-tree debug: using "fs" queue backend debug: using "ramqueue" scheduler backend debug: using "ram" stat backend setup_peer: queue -> scheduler[41566] fd=7 setup_peer: klondike -> control[96994] fd=4 setup_peer: klondike -> pony express[25508] fd=5 setup_proc: klondike done setup_done: ca[11371] done setup_proc: control done setup_done: control[96994] done setup_proc: lookup done setup_done: lka[8371] done setup_proc: pony express done setup_done: pony[25508] done setup_proc: queue done setup_done: queue[54682] done debug: ca_engine_init: using RSA privsep engine debug: init ssl-tree debug: init ca-tree debug: init ssl-tree debug: using "fs" queue backend debug: using "ramqueue" scheduler backend debug: using "ram" stat backend setup_peer: scheduler -> control[96994] fd=4 setup_peer: scheduler -> queue[54682] fd=5 setup_proc: scheduler done setup_done: scheduler[41566] done debug: bounce warning after 4h smtpd: setup done debug: parent_send_config_ruleset: reloading debug: parent_send_config: configuring pony process debug: parent_send_config: configuring ca process debug: smtp: listen on IPv6:::1 port 25 flags 0x400 pki "" ca "" debug: init private ssl-tree debug: smtp: listen on IPv6:fe80::1%lo0 port 25 flags 0x400 pki "" ca "" debug: smtp: listen on 127.0.0.1 port 25 flags 0x400 pki "" ca "" debug: smtp: will accept at most 501 clients debug: queue: done loading queue into scheduler debug: smtpd: scanning offline queue... debug: smtpd: offline scanning done Then I run: local$ echo "Hello test" | sendmail -v -f sender destinat...@example1.com <<< 220 local.home.org ESMTP OpenSMTPD >>> EHLO localhost <<< 250-local.home.org Hello localhost [local], pleased to meet you <<< 250-8BITMIME <<< 250-ENHANCEDSTATUSCODES <<< 250-SIZE 36700160 <<< 250 HELP >>> MAIL FROM:<sen...@local.home.org> <<< 250 2.0.0: Ok >>> RCPT TO:<destinat...@example1.com> <<< 250 2.1.5 Destination address valid: Recipient ok >>> DATA <<< 354 Enter mail, end with "." on a line by itself >>> . <<< 250 2.0.0: 678f2f62 Message accepted for delivery >>> QUIT <<< 221 2.0.0: Bye Which causes the following response in “smtpd -dv”: c41771e881808b4f smtp connected address=local host=local.home.org smtp: 0xd70be606000: fd 13 from queue smtp: 0xd70be606000: message fd 13 debug: 0xd71539d5000: adding Message-ID debug: 0xd70be606000: end of message, error=0 c41771e881808b4f smtp message address=local host=local.home.org msgid=678f2f62 from=<sen...@local.home.org> to=<destinat...@example1.com> size=300 ndest=1 proto=ESMTP debug: scheduler: evp:678f2f628b32567d scheduled (mta) c41771e881808b4f smtp disconnected address=local host=local.home.org reason=quit debug: mta: querying smarthost for relay:<dynamic:0>... debug: mta: querying smarthost debug: mta: ... got smarthost for 678f2f628b32567d: smtp+tls://my_re...@smtphm.example0.co.jp:587 debug: mta: received evp:678f2f628b32567d for <destinat...@example1.com> debug: mta: draining [relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx] refcount=1, ntask=1, nconnector=0, nconn=0 debug: mta: querying secret for [relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx]... debug: mta: querying MX for [relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx]... debug: mta: [relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx] waiting for MX secret debug: mta: ... got secret for [relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx]: BASE64SECRETS debug: mta: draining [relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx] refcount=2, ntask=1, nconnector=0, nconn=0 debug: mta: [relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx] waiting for MX debug: control -> client: pipe closed debug: clearing p=client, fd=11, pid=0 debug: MXs for domain smtphm.example0.co.jp: 123.456.789.101 preference -1 debug: mta: ... got mx (0xd718be3e7a0, smtphm.example0.co.jp, [relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx]) debug: mta: draining [relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx] refcount=1, ntask=1, nconnector=0, nconn=0 debug: mta: querying source for [relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx]... debug: mta: ... got source for [relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx]: [] debug: mta: new [connector:[]->[relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx],0x10000] debug: mta: connecting with [connector:[]->[relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx],0x0] debug: mta-routing: searching new route for [connector:[]->[relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx],0x0]... debug: mta-routing: selecting candidate route [] <-> 123.456.789.101 debug: mta-routing: spawning new connection on [] <-> 123.456.789.101 debug: mta: 0xd7124a566f0: spawned for relay [relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx] debug: mta: connecting with [connector:[]->[relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx],0x0] debug: mta: cannot use [relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx] before 2s debug: mta-routing: no route available for [connector:[]->[relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx],0x0]: must wait a bit debug: mta: retrying to connect on [connector:[]->[relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx],0x0] in 2s... debug: mta: draining [relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx] refcount=3, ntask=1, nconnector=1, nconn=1 debug: mta: scheduling relay [relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx] in 1s... c41771ec2113e5d0 mta connecting address=smtp+tls://123.456.789.101:587 host=smtp.owm.example0.co.jp c41771ec2113e5d0 mta connected debug: lka: looking up pki "local.home.org" debug: pony: rsae_init debug: pony: rsae_pub_dec debug: pony: rsae_bn_mod_exp c41771ec2113e5d0 mta starttls ciphers=version=TLSv1.2, cipher=DHE-RSA-AES256-GCM-SHA384, bits=256 debug: certificate 0: len=1865 debug: certificate chain len: 3 debug: certificate 1: len=1865 debug: certificate 2: len=1298 debug: certificate 3: len=1090 smtp-out: Server certificate verification succeeded on session c41771ec2113e5d0 c41771ec2113e5d0 mta error reason=AUTH rejected: 535 Authentication failed debug: mta: 0xd7124a566f0: session done debug: pony: rsae_finish debug: mta_route_collect([] <-> 123.456.789.101 (smtp.owm.example0.co.jp)) smtp-out: Disabling route [] <-> 123.456.789.101 (smtp.owm.example0.co.jp) for 15s debug: mta: connecting with [connector:[]->[relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx],0x20000] debug: mta: cancelling connector timeout debug: mta: cannot use [relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx] before 2s debug: mta-routing: no route available for [connector:[]->[relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx],0x0]: must wait a bit debug: mta: retrying to connect on [connector:[]->[relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx],0x0] in 2s... debug: mta: ... timeout for [relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx] debug: mta: draining [relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx] refcount=1, ntask=1, nconnector=1, nconn=0 debug: mta: querying source for [relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx]... debug: mta: ... got source for [relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx]: [] debug: mta: connecting with [connector:[]->[relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx],0x20000] debug: mta: cancelling connector timeout debug: mta: cannot use [relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx] before 1s debug: mta-routing: no route available for [connector:[]->[relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx],0x0]: must wait a bit debug: mta: retrying to connect on [connector:[]->[relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx],0x0] in 1s... debug: mta: draining [relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx] refcount=2, ntask=1, nconnector=1, nconn=0 debug: mta: scheduling relay [relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx] in 10s... debug: mta: ... timeout for [connector:[]->[relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx],0x20000] debug: mta: connecting with [connector:[]->[relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx],0x0] debug: mta-routing: searching new route for [connector:[]->[relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx],0x0]... debug: mta-routing: skipping route [] <-> 123.456.789.101 (smtp.owm.example0.co.jp): suspend smtp-out: No valid route for [connector:[]->[relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx],0x0] debug: mta-routing: no route available for [connector:[]->[relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx],0x8]: errors on connector debug: mta: ... timeout for [relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx] debug: mta: draining [relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx] refcount=1, ntask=1, nconnector=1, nconn=0 debug: mta: querying source for [relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx]... debug: mta: ... got source for [relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx]: [] debug: mta: connecting with [connector:[]->[relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx],0x8] debug: mta: connector error debug: mta: draining [relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx] refcount=2, ntask=1, nconnector=1, nconn=0 debug: mta: querying source for [relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx]... debug: mta: ... got source for [relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx]: [] debug: mta: connecting with [connector:[]->[relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx],0x8] debug: mta: connector error debug: mta: draining [relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx] refcount=3, ntask=1, nconnector=1, nconn=0 debug: mta_flush([relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx], 82, "Network error on destination MXs") 0000000000000000 mta delivery evpid=678f2f628b32567d from=<sen...@local.home.org> to=<destinat...@example1.com> rcpt=<-> source="-" relay="smtphm.example0.co.jp" delay=11s result="TempFail" stat="Network error on destination MXs" debug: mta: freeing [relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx] debug: mta: freeing [connector:[]->[relay:smtphm.example0.co.jp,port=587,smtp+tls,auth=secrets:my_relay,mx],0x8] debug: mta: flush for 678f2f628b32567d (-> destinat...@example1.com) smtp-out: Enabling route [] <-> 123.456.789.101 (smtp.owm.example0.co.jp) debug: mta: mta_route_unref(): really discarding route [] <-> 123.456.789.101 (smtp.owm.example0.co.jp) -- You received this mail because you are subscribed to misc@opensmtpd.org To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org