> Am 30.09.2018 um 08:31 schrieb Michael Knill > <michael.kn...@ipcsolutions.com.au>: > > Hmm strange > > I have this and it still uses 3999 as the from user. Note this is a > derivative of the hostname 3999-IBCBuild-CM1. > > echo "Backup failed for archive $FN" | mail -r "r...@ipcsolutions.com.au" -s > "WARNING: Backup Failed for archive $FN" monitor...@ipcsolutions.com.au > > Regards > Michael Knill
Hi Michael, I always use the: SMTP_FROM="u...@host.com" setting in our "user.conf". > On 30/9/18, 9:52 am, "Lonnie Abelbeck" <li...@lonnie.abelbeck.com> wrote: > > Just guessing the From is being derived from your hostname, you did not > mention how you were sending the email. > > The -r argument for "mail" defines the From address, including a text name > if you wish (like my example). > > I always define the From: address. > > Lonnie > > PS, You can delete the "stuck" email by using > -- > msmtpqueue delete /var/spool/mail/2018-09-30-09.29.46-0 > -- > > > >> On Sep 29, 2018, at 6:33 PM, Michael Knill >> <michael.kn...@ipcsolutions.com.au> wrote: >> >> Thanks Lonnie >> >> Interestingly all my other mails have a from address of >> r...@ipcsolutions.com.au but from my script its 3...@ipcsolutions.com.au and >> being rejected by my mail server. What specifies the from address? >> >> e.g. >> Sep 30 09:32:38 3999-IBCBuild-CM1 mail.err msmtp: >> host=smtp.ipcsolutions.com.au tls=on auth=on >> user=nore...@ipcsolutions.com.au from=3...@ipcsolutions.com.au >> recipients=r...@ipcsolutions.com.au smtpstatus=550 smtpmsg='550 5.7.60 SMTP; >> Client does not have permissions to send as this sender >> [SYAPR01MB2430.ausprd01.prod.outlook.com]' errormsg='the server did not >> accept the mail' exitcode=EX_UNAVAILABLE >> Sep 30 09:32:38 3999-IBCBuild-CM1 mail.info msmtpqueue: (69) msmtp: the >> server did not accept the mail msmtp: server message: 550 5.7.60 SMTP; >> Client does not have permissions to send as this sender >> [SYAPR01MB2430.ausprd01.prod.outlook.com] msmtp: could not send mail >> (account default from /etc/msmtprc) >> Sep 30 09:32:38 3999-IBCBuild-CM1 mail.info msmtpqueue: Failure: Keeping >> mail queue /var/spool/mail/2018-09-30-09.29.46-0 msmtp/mail pair. >> >> Regards >> Michael Knill >> >> On 30/9/18, 9:21 am, "Lonnie Abelbeck" <li...@lonnie.abelbeck.com> wrote: >> >> Hi Michael, >> >> You probably got the one of the envelope addresses wrong. >> >> Here is an example where I email myself a note whenever my main AstLinux >> box is rebooted... >> -- >> #!/bin/sh >> >> . /etc/rc.conf >> >> mail -r "REBOOT-$HOSTNAME <nore...@abelbeck.com>" -s "Rebooted at >> '$HOSTNAME'" m...@example.com <<EOF >> Rebooted at '$HOSTNAME' >> >> [Generated at $(date "+%H:%M:%S on %B %d, %Y")] >> EOF >> -- >> >> Here are the "mail" options ... >> >> $ mail --help >> -- >> >> Usage: mail [options...] to_addr >> >> Options: >> -a file Attach the given file to the message. (Multiple allowed) >> --mime type Optionally define the MIME Type of each attached file. >> (Multiple allowed) >> -b address Send blind carbon copies to a comma-separated list of email >> addresses. >> -c address Send carbon copies to a comma-separated list of email >> addresses. >> -e Check if mail is present. (Always exit status of "1") >> -H Print header summaries for all messages and exit. (Always >> no mail) >> -r address Define the From address. >> -S var=val Sets the internal option variable, from= and replyto= are >> supported. >> -s subject Define the subject text. >> -t The sending message is expected to contain "To:", "Cc:" or >> "Bcc:" fields. >> -u user Reads the mailbox of the given user name. (Always no mail) >> -V Print version and exit. >> -v Verbose mode. >> --help Show this help text >> Note: Additional mail/mailx options are silently ignored >> for compatibility. >> -- >> >> This is particularly handy if you want to attach a file(s) with one or >> more -a file pairs. >> >> Test from the command-line. >> >> Lonnie >> >> >>> On Sep 29, 2018, at 6:00 PM, Michael Knill >>> <michael.kn...@ipcsolutions.com.au> wrote: >>> >>> Hi group >>> >>> Sorry this is probably an easy one. >>> I am sending mail from my tarsnap script using the mail command and it just >>> ends up in the mail spool and does not send. >>> What am I doing wrong? >>> >>> Regards >>> Michael Knill Michael http://www.mksolutions.info _______________________________________________ Astlinux-users mailing list Astlinux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/astlinux-users Donations to support AstLinux are graciously accepted via PayPal to pay...@krisk.org.