Bug 244630 - dma(8): Refresh from upstream
Summary: dma(8): Refresh from upstream
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 12.1-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: needs-qa, patch
Depends on:
Blocks:
 
Reported: 2020-03-06 11:31 UTC by Jan-Piet Mens
Modified: 2020-06-08 06:05 UTC (History)
4 users (show)

See Also:
koobs: mfc-stable12?


Attachments
patch to import dma (41.52 KB, patch)
2020-03-06 12:24 UTC, Jan-Piet Mens
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan-Piet Mens 2020-03-06 11:31:49 UTC
I'm seeing authentication failures and strange messages in /var/log/maillog during dma(8) transfers, which doesn't make much sense as the SMTP server I'm speaking to offers LOGIN PLAIN authentication methods.

[root@gs /etc/dma]# echo hi | /usr/libexec/dma -D jp@example
dma[1052a][56283]: new mail from user=root uid=26 envelope_from=<root@shuttle.ww.example>
dma[1052a][56283]: mail to=<jp@example> queued as 1052a.800a5d0a0
dma[1052a.800a5d0a0][56283]: <jp@example> trying delivery
dma[1052a.800a5d0a0][56283]: using smarthost (mail.relay:587)
dma[1052a.800a5d0a0][56283]: trying remote delivery to mail.relay [ipv6] pref 0
dma[1052a.800a5d0a0][56283]: connect to mail.relay [ipv6] failed: No route to host
dma[1052a.800a5d0a0][56283]: trying remote delivery to mail.relay [ip4] pref 0
dma[1052a.800a5d0a0][56283]: using SMTP authentication for user jp@example
dma[1052a.800a5d0a0][56283]: remote delivery deferred: AUTH cram-md5 failed: 535 Refused. Authentication failed. Rate limit hit or SMTP disabled.
dma[1052a.800a5d0a0][56283]: SMTP login not available. Trying without.
dma[1052a.800a5d0a0][56283]: <jp@example> delivery successful

I then compiled a version of https://github.com/corecode/dma and the program works as expected:

[root@gs /tmp/dma/bsd]# echo hi | ./dma/dma -D jp@example
dma[10528][56272]: new mail from user=root uid=65534 envelope_from=<root@shuttle.ww.example>
dma[10528][56272]: mail to=<jp@example> queued as 10528.800a5d0a0
dma[10528.800a5d0a0][56272]: <jp@example> trying delivery
dma[10528.800a5d0a0][56272]: using smarthost (mail.relay:587)
dma[10528.800a5d0a0][56272]: trying remote delivery to mail.relay [ipv6] pref 0
dma[10528.800a5d0a0][56272]: connect to mail.relay [ipv6] failed: No route to host
dma[10528.800a5d0a0][56272]: trying remote delivery to mail.relay [ip4] pref 0
dma[10528.800a5d0a0][56272]: using SMTP authentication for user jp@example
dma[10528.800a5d0a0][56272]: <jp@example> delivery successful

I think we should please pull in a newer version; I've compiled a diff for *.? between what's currently in FreeBSD and upstream dma

https://gist.githubusercontent.com/jpmens/ef3a407212bd7d0295da1c9a7169f5c3/raw/46ae123777632263053cc24432cfe09fb3c1a356/differences.patch
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2020-03-06 11:44:52 UTC
@Jan-Piet Could you attach the proposed patch as an attachment please
Comment 2 Jan-Piet Mens 2020-03-06 12:24:04 UTC
Created attachment 212184 [details]
patch to import dma
Comment 3 Jan-Piet Mens 2020-03-06 12:24:39 UTC
(In reply to Kubilay Kocak from comment #1)

Kubilay, I have now prepared a patch which I herewith attach. It compiles on my test system and the binary appears to do what I think it should. :-)