--- /usr/local/bin/mcom Tue Oct 2 15:38:41 2018 +++ /home/attila/bin/mcom Sat Apr 27 10:44:44 2019 @@ -73,6 +73,7 @@ sendmail=$(mhdr -h sendmail "$MBLAZE/profile") sendmail_args=$(mhdr -h sendmail-args "$MBLAZE/profile") sendmail="${sendmail:-sendmail} ${sendmail_args:--t}" default_from=$(mhdr -h local-mailbox "$MBLAZE/profile") +auto_from=$(mhdr -h auto-from "$MBLAZE/profile") hdrs= resume= @@ -351,6 +352,10 @@ while :; do sendmail="${sendmail:-sendmail} -- $resent" ;; esac + if [ -n "$auto_from" ]; then + from="$(echo $draft | maddr -a -h from)" + sendmail="${sendmail} ${auto_from} ${from}" + fi if [ -e $draftmime ]; then if [ $draft -ot $draftmime ] || [ "$automime" -eq 1 ]; then