Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
0
votes
1
answers
3557
views
Configuring postfix in local machine in order to send mails
I am trying to automate a procedure and when a certain condition is met I would like to notify the user with an automated mail using the **mail** command. The thing is, that the messages are not being send and as far as I understood there are some configurations that have to be made first. The thing...
I am trying to automate a procedure and when a certain condition is met I would like to notify the user with an automated mail using the **mail** command.
The thing is, that the messages are not being send and as far as I understood there are some configurations that have to be made first.
The thing is that when I go with
sudo dpkg-reconfigure postfix
in order to modify it I am not completely sure about what to fill there.
- 1 - The first page asks for System mail name
- 2 - The second one asks
for root and postmaster mail recipients
- 3 - Other destinations to
accept mail
- 4 - Force synchronous mail queue Y/N
- 5 - Local networks
(this was pre-filled)
- 6 - Mailbox size
- 7 - Local address extension
character
- 8 - Protocols (ipv6, ipv4) # I selected them both
But I really need help with 1,2,3,5,7 because when i try to send a test mail I do not receive anything
Thank you in advance
Update:
### OS info
NAME="Ubuntu"
VERSION="20.04 LTS (Focal Fossa)"
### Postfix version
mail_version = 3.4.10
### postconf
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
compatibility_level = 2
inet_interfaces = all
inet_protocols = all
mailbox_size_limit = 100
mydestination = aoos.homenet.telecomitalia.it, aoos, localhost.localdomain, , localhost
myhostname = aoos.homenet.telecomitalia.it
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter =
relayhost =
smtp_tls_CApath = /etc/ssl/certs
smtp_tls_security_level = may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
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
### mailq
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
DD866CE073F* 2566 Sun May 10 18:17:10 MAILER-DAEMON
broxigar@aoos
DA34ECE0693* 2493 Fri May 15 19:08:58 MAILER-DAEMON
broxigar@aoos
D474DCE0692* 2531 Fri May 15 19:08:58 MAILER-DAEMON
broxigar@aoos
CFCC4CE0690* 2491 Fri May 15 19:08:58 MAILER-DAEMON
broxigar@aoos
0DC1FCE0738* 2398 Sun May 10 18:05:51 MAILER-DAEMON
broxigar@aoos
D06F9CE0691* 2497 Fri May 15 19:08:58 MAILER-DAEMON
broxigar@aoos
3534ECE068E 417 Fri May 15 17:01:06 broxigar@aoos
(host mx..it[130.192.182.65] said: 452 4.5.2 Could not resolve sender domain. (in reply to MAIL FROM command))
userXXX@.it
## After Edit (postconf -n)
# 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
smtp_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_tls_wrappermode = yes
smtp_tls_security_level = encrypt
#smtp_tls_CApath=/etc/ssl/certs
#smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
#smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
#smtp_sasl_auth_enable = yes
#smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
#smtp_sasl_security_options = noanonymous
#smtp_tls_security_level = encrypt
#smtp_tls_wrappermode = yes
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = aoos.polito.it
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname, aoos.polito.it, localhost.polito.it, localhost
#myorigin = $mydomain
relayhost = [mail.polito.it]:465
#relay_domains = $mydestination
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
## After Edit (mailq)
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
64428CE10EA* 2334 Fri Jun 19 22:55:27 MAILER-DAEMON
broxigar@aoos
## After Edit (journalctl -xe)
Jun 19 22:55:29 aoos postfix/smtp: 64428CE10EA: to=, relay=server.domain.it[]:465, delay=2, delays=0.01/0/0.03/2, dsn=5.0.0, status=bounced (host server.domain.it[] said: 551 broxigar@aoos failed to route the address (in reply to RCPT TO command))
ex1led
(286 rep)
May 10, 2020, 04:24 PM
• Last activity: Jul 2, 2025, 12:03 AM
1
votes
1
answers
2818
views
sending alerts from linux machine through email to MS outlook exchange
I Have a Scenario. I have written a shell script who check the space of mount point '/u06'. if free space is greater then 20% then its OK or if free space is less then 20% then it should generate a mail and send it to System Administrator. Our organization is using MS Outlook mailing. I want to know...
I Have a Scenario. I have written a shell script who check the space of mount point '/u06'. if free space is greater then 20% then its OK or if free space is less then 20% then it should generate a mail and send it to System Administrator. Our organization is using MS Outlook mailing. I want to know how can I send alerts through my Linux machine to exchange server. How to configure email in Linux?
M. AZ
(11 rep)
Aug 31, 2016, 07:49 AM
• Last activity: Jun 13, 2025, 01:10 AM
1
votes
0
answers
63
views
Send an email with an attachment using mail command line
I'm trying to send an email with an attachment using the command `mail` but neither option `-a` nor `-A` works. * With `-a`: ```lang-sh echo "Please, find attached the report" | mail -s "Report" -r "info@myorg.org" -a report.csv recipient@myorg.org ``` In this case `-a` is treated as a header in the...
I'm trying to send an email with an attachment using the command
mail
but neither option -a
nor -A
works.
* With -a
:
-sh
echo "Please, find attached the report" | mail -s "Report" -r "info@myorg.org" -a report.csv recipient@myorg.org
In this case -a
is treated as a header in the email, not as an attachment.
* With -A
:
-sh
echo "Please, find attached the report" | mail -s "Report" -r "info@myorg.org" -A report.csv recipient@myorg.org
In this case -A
is not recognised as a valid argument to mail. The output is:
invalid option -- 'A'
I don't have mutt
command available, so any help with the command mail
would be much appreciated.
Cristina P.
(11 rep)
May 28, 2025, 10:33 AM
• Last activity: May 28, 2025, 02:57 PM
0
votes
1
answers
2361
views
Can I prevent postfix from sending to specific email addresses using the check_recipient_access postfix option?
I tried to block some email addresses from spammers, but this setup doesn't seem to have any effect: smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/bad_recipients, permit_sasl_authenticated, permit_mynetworks, ... The emails are still forwarded. Here is an example of the bad...
I tried to block some email addresses from spammers, but this setup doesn't seem to have any effect:
smtpd_recipient_restrictions =
check_recipient_access hash:/etc/postfix/bad_recipients,
permit_sasl_authenticated,
permit_mynetworks,
...
The emails are still forwarded. Here is an example of the bad_recipients file I have:
# When updating, make sure to run this command once:
# postmap hash:/etc/postfix/bad_recipients
spammer@example.com REJECT
When I do a mail to that email address, it still gets forwarded.
alexis $ mail -s "Verify block" spammer@example.com
Cc:
Not much of interest here.
^D
When I look at the logs I see something like this:
> Mar 5 20:02:37 do postfix/smtp: E827740ADA: to=,
> relay=mail.example.com[10.0.0.13]:25, delay=2.3, delays=0.03/0.01/1.8/0.41,
> dsn=5.7.1, status=bounced (host mail.example.com[10.0.0.13] said: 550 5.7.1
> No such user! (in reply to RCPT TO command))
_Note: I edited the domain name and IP address._
The relaying to the external source clearly shows that my
smtpd_recipient_restrictions
settings did not block anything. I'm thinking that either it only accepts domains (although I think [the doc examples here](http://www.postfix.org/RESTRICTION_CLASS_README.html) say otherwise) or I have something else that tells postfix to ignore my list of recipient restrictions. Do you know how to make this feature work?
Alexis Wilke
(3095 rep)
Mar 5, 2020, 08:17 PM
• Last activity: May 9, 2025, 07:04 PM
0
votes
3
answers
2775
views
How to attach a file while sending an email through shell script?
I used the following code to send an email via shell script. Code: `mail -s "subject" toaddress@gmail.com <<< "Body of the mail"` It worked. But I want to attach a file while sending the mail. How to do it?
I used the following code to send an email via shell script.
Code:
mail -s "subject" toaddress@gmail.com <<< "Body of the mail"
It worked. But I want to attach a file while sending the mail. How to do it?
Velu
(471 rep)
Apr 30, 2019, 05:27 AM
• Last activity: Feb 3, 2025, 09:01 AM
7
votes
4
answers
13639
views
HTML email from heirloom mailx on linux
I've been trying to work through sending a html email from mailx on a linux server. Few Notes: - I have to specify a smtp server so therefore I cannot use sendmail (This is not something I can change on my end) - I cannot install 3rd party things such as mutt. I will have to use mail or mailx - Sinc...
I've been trying to work through sending a html email from mailx on a linux server.
Few Notes:
- I have to specify a smtp server so therefore I cannot use sendmail
(This is not something I can change on my end)
- I cannot install 3rd party things such as mutt. I will have to use
mail or mailx
- Since my mail/x version is heirloom I do not have the --append or -a (attach header options)
- not sure if this helps at all but my linux distro is 7.3 (Maipo)
What I've seen in most posts on stackoverflow for my case:
mailx -v -S smtp=SERVER -s "$(echo -e "This is the subject\nContent-Type: text/html")" -r FROM TO Content-Disposition: inline Message-ID: User-Agent: Heirloom
> mailx 12.5 7/5/10 MIME-Version: 1.0 Content-Type: text/plain;
> charset=us-ascii Content-Transfer-Encoding: 7bit Hello World
Try 2:
So I do not want the headers printed out in the body. So I tried to remove the Content-Disposition: inline
mailx -v -S smtp=SERVER -s "$(echo -e "This is the subject v2\nContent-Type: text/html\nMIME-Version: 1.0")" -r FROM TO `
> Hello World
> `
Try 3:
Tried flip flopping content-type and mime-version
mailx -v -S SERVER -s "$(echo -e "This is the subject v3\nMIME-Version: 1.0\nContent-Type: text/html")" -r FROM TO X-Priority: 1 (Highest) Message-ID: User-Agent: Heirloom mailx
> 12.5 7/5/10 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello World
After all of this, I've tried many other adaptations of the above tries but they led to no new output.
So any suggestions or ideas are gladly accepted! Please keep in mind my constraints listed above...I know they limit my options but that's out of my control.
thanks for your time!
FzZB03KCa46QeaU
(91 rep)
Aug 7, 2017, 04:45 PM
• Last activity: Jan 17, 2025, 06:09 AM
0
votes
0
answers
182
views
How do we add email classification or Sensitivity comparable to Outlook onto mail command on Linux
How do we add email classification onto mail command on Linux? I'm currently using the following command: mail -s "$(echo - e " Test\From:abc\nContent-Type: text/html")" -S -smtp="SMTP relay server" mailbox edit: If I interpret the original poster's question correctly this would only be for outgoing...
How do we add email classification onto mail command on Linux?
I'm currently using the following command:
mail -s "$(echo - e " Test\From:abc\nContent-Type: text/html")" -S -smtp="SMTP relay server" mailbox
edit: If I interpret the original poster's question correctly this would only be for outgoing mail and be similar to Microsoft Outlook which has a **Sensitivity** drop down with choices like
unrestricted
or third party proprietary TTPI
where that syntax seems to just be appended to the mail subject line. Is there a way to make this happen in Linux like it does in Microsoft Outlook?
google outlook email sensitivity
and look at related pics to get an idea.
example: https://www.vumc.org/it/vumc-it-blog/use-sensitivity-labels-outlook-protect-email
Victor D'Souza
(9 rep)
Aug 5, 2024, 01:08 PM
• Last activity: Aug 5, 2024, 08:51 PM
9
votes
4
answers
6008
views
Delete Mail Based on Subject Pattern
Is it possible to delete all mail in which the subject matches a regex pattern? For example, to delete message 1, you do: d 1 But to delete all mail with subject starting with, say, `[SPAM]`, I can't do: d -s "^\[SPAM\].*$"
Is it possible to delete all mail in which the subject matches a regex pattern?
For example, to delete message 1, you do:
d 1
But to delete all mail with subject starting with, say,
[SPAM]
, I can't do:
d -s "^\[SPAM\].*$"
nehcsivart
(641 rep)
Jan 17, 2017, 06:18 PM
• Last activity: Jul 27, 2024, 04:55 PM
5
votes
2
answers
7503
views
Mail vs. mail what is the difference
What is this business about `mail` and `Mail`? [On a CentOS box] Why `mail` does not work but won't return an error either while `Mail` works fine with the exact same syntax? `Mail` is basically a link to `mail`, isn't it? Sorry, this was a mixup, apparently (for historical reasons?!) there is a `ma...
What is this business about
mail
and Mail
?
[On a CentOS box] Why mail
does not work but won't return an error either while Mail
works fine with the exact same syntax?
Mail
is basically a link to mail
, isn't it?
Sorry, this was a mixup, apparently (for historical reasons?!) there is a mail
and a Mail
Nowadays it looks like they both point to the same thing, on my machine:
sr-linux> ls -l which mail
-rwxr-xr-x 1 root mail 66492 Jun 24 2001 /bin/mail
sr-linux> ls -l which Mail
lrwxrwxrwx 1 root root 14 Nov 19 2001 /usr/bin/Mail -> ../../bin/mail
Ali
(7243 rep)
Dec 8, 2011, 05:56 PM
• Last activity: Feb 23, 2024, 10:15 AM
1
votes
1
answers
207
views
Mailing an html file
Is it possible to mail an html file that looks exactly like the second image? I know ```mutt -e 'set content_type="text/html"' -s "Subject" user@email.com < test.html``` works but it sends the html (first image) without the css or "design". [![enter image description here][1]][1] [

Ykaly
(73 rep)
Dec 26, 2019, 04:35 AM
• Last activity: Feb 7, 2024, 05:07 PM
9
votes
4
answers
18172
views
Need to delete mails for a range of dates in Linux
I have 1 million mails generated in a Linux server due to a cron job. I want to delete the mails, but not all as this cron mails useful to troubleshoot and find out the issue with cron job's execution. So I need to keep one month's mail and remove the remaining.
I have 1 million mails generated in a Linux server due to a cron job. I want to delete the mails, but not all as this cron mails useful to troubleshoot and find out the issue with cron job's execution. So I need to keep one month's mail and remove the remaining.
ksk.eaknath
(91 rep)
Aug 25, 2014, 10:53 AM
• Last activity: Feb 4, 2024, 10:50 AM
0
votes
1
answers
891
views
mail: unrecognized option '-S' | sending mail from linux server
I am trying to run a bash to send emails from my linux server. I am using the following command: ```echo "This is the message body" | mail -s "This is the subject line" -a "From: " -a "To: " -S smtp="smtp.gmail.com:587" -S smtp-use-starttls -S ssl-verify=ignore -S smtp-auth=login -S smtp-auth-user=$...
I am trying to run a bash to send emails from my linux server. I am using the following command:
"This is the message body" | mail -s "This is the subject line" -a "From: " -a "To: " -S smtp="smtp.gmail.com:587" -S smtp-use-starttls -S ssl-verify=ignore -S smtp-auth=login -S smtp-auth-user=$SMTP_USER -S smtp-auth-password=$SMTP_PASS
I am receiving the error: : unrecognized option '-S'
As far as I read, previously mailx was used but this error shouldn't occur with mail command. can you please help me where I am going wrong?
System Info: Ubuntu 20.04.5 LTS (GNU/Linux 5.15.0-1040-azure x86_64)
--version
>> mail (GNU Mailutils) 3.7
user3165121
(1 rep)
Sep 14, 2023, 08:12 AM
• Last activity: Sep 15, 2023, 10:05 AM
0
votes
1
answers
726
views
How to make mail command to send email to root after installing msmtp?
Install a simple SMTP client: sudo apt install msmtp msmtp-mda Set in msmtprc :: cat .msmtprc account default host smtp.qq.com from x1@qq.com auth on tls on tls_certcheck off user x1@qq.com password xxxx logfile ~/.msmtp.log I can send email with qq account. echo "Testing msmtp " | mail -s "hi root"...
Install a simple SMTP client:
sudo apt install msmtp msmtp-mda
Set in msmtprc
::
cat .msmtprc
account default
host smtp.qq.com
from x1@qq.com
auth on
tls on
tls_certcheck off
user x1@qq.com
password xxxx
logfile ~/.msmtp.log
I can send email with qq account.
echo "Testing msmtp " | mail -s "hi root" -r x1@qq.com -- aa@yahoo.com
The email can be found in yahoo email.
I find a new issue that user can't send email to root in system!
echo "cron task work done " | mail -s "hi root" root
mail: cannot send message: Process exited with a non-zero status
Check the log:
Aug 24 20:47:31 host=smtp.qq.com tls=on auth=on user=x1@qq.com from=debian@debian.debian recipients=root@debian.debian smtpstatus=501 smtpmsg='501 Mail from address must be same as authorization user.' errormsg='envelope from address debian@debian.debian not accepted by the server' exitcode=EX_DATAERR
echo "cron task work done " | mail -s "hi root" -r debian@debian.debian root
The log info:
Aug 29 06:56:39 host=smtp.qq.com tls=on auth=on user=x1@qq.com from=debian@debian.debian recipients=root@debian.debian smtpstatus=501 smtpmsg='501 Mail from address must be same as authorization user.' errormsg='envelope from address debian@debian.debian not accepted by the server' exitcode=EX_DATAERR
Everytime mail command was called ,it relay to external host smtp.qq.com enven if i specify return host as debian@debian.debian,how can make mail command send email between user and root in the system?
I find that postfix or exim4 will be removed when to install msmtp-mda,the fact maybe realted with my issue.
showkey
(499 rep)
Aug 24, 2023, 12:52 PM
• Last activity: Aug 30, 2023, 03:49 PM
19
votes
3
answers
83745
views
Set sender name in mail function
How can I set sender name and email address using mail command in shell script.
How can I set sender name and email address using mail command in shell script.
Ankur
(303 rep)
May 4, 2015, 05:20 AM
• Last activity: Aug 16, 2023, 10:54 AM
0
votes
1
answers
300
views
Script to send an alert mail once the disk space is above 90% sends disk full even when the disk isn't full, how to resolve this issue?
#!/bin/bash df -m > myfile server_ip_address=$(ip addr show $(ip route | awk '/default/ { print $5 }') | grep "inet" | head -n 1 | awk '/inet/ {print $2}' | cut -d'/' -f1) if awk '$2 > 10000 && $5 > 90' myfile ; then echo "Disk Full in $server_ip_address" else echo "Nothing wrong with the server" fi...
#!/bin/bash
df -m > myfile
server_ip_address=$(ip addr show $(ip route | awk '/default/ { print $5 }') | grep "inet" | head -n 1 | awk '/inet/ {print $2}' | cut -d'/' -f1)
if awk '$2 > 10000 && $5 > 90' myfile ; then
echo "Disk Full in $server_ip_address"
else
echo "Nothing wrong with the server"
fi
When I execute the script, always get disk full as output?
Output of df -m looks like this:
Filesystem 1M-blocks Used Available Use% Mounted on
/dev/mapper/centos-root 949305 512827 436479 55% /
devtmpfs 3811 0 3811 0% /dev
tmpfs 3823 0 3823 0% /dev/abc
tmpfs 3823 18 3806 1% /run
tmpfs 3823 0 3823 0% /sys/fs/cgroup
/dev/sda2 1014 175 840 18% /boot
/dev/sda1 1022 12 1011 2% /boot/efi
tmpfs 765 0 765 0% /run/user/2000
The outut of df -m differs from server to server. I am thus comparing if Size>10GB and Use%>90%. As some disk with size<10GB may not be important to be under 90% disk usage.
**Update 1:**
GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu)
OS is centos 7
Problem with the current code:
I need to compare from the second row to last row columns, but my current code is comparing the first rows columns, that's why I suppose it's not working. How to resolve the issue?
achhainsan
(543 rep)
Aug 6, 2023, 05:32 AM
• Last activity: Aug 6, 2023, 01:30 PM
0
votes
0
answers
1348
views
timed out while receiving the initial server greeting
I'm trying to host a postfix mail server.I have a box with a fixed IP and also a mx record and spf record that link my box IP to my dns record. I can telnet to alt4.gmail-smtp-in.l.google.com 25 but when I send a mail to me@gmail.com, I still receive this error **mailq** ``` -Queue ID- --Size-- ----...
I'm trying to host a postfix mail server.I have a box with a fixed IP and also a mx record and spf record that link my box IP to my dns record. I can telnet to alt4.gmail-smtp-in.l.google.com 25 but when I send a mail to me@gmail.com, I still receive this error
**mailq**
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
CB502D9735* 389 Tue Jul 18 01:28:17 root@mydomain.com
me@gmail.com
37A54D8C06 389 Tue Jul 18 00:26:34 root@mydomain.com
(conversation with alt4.gmail-smtp-in.l.google.com[74.125.200.26] timed out while receiving the initial server greeting)
me@gmail.com
BBC43D9557 389 Tue Jul 18 01:11:20 root@mydomain.com
(conversation with alt4.gmail-smtp-in.l.google.com[74.125.200.26] timed out while receiving the initial server greeting)
me@gmail.com
telnet alt4.gmail-smtp-in.l.google.com 25
Trying 74.125.200.27...
Connected to alt4.gmail-smtp-in.l.google.com.
Escape character is '^]'.
I_md_ou
(1 rep)
Jul 18, 2023, 07:40 AM
4
votes
1
answers
185
views
Where are these "extra" RCPT_TO lines coming from when I send an email via SSMTP?
I've been using SSTMP on a local FreeBSD machine to send stuff like the output of certain cron jobs to my "real" main email account, which is not hosted on the same machine (or even domain). For example, I have a daily cron job set up as so: ``` smartctl -a /dev/ada0 | grep overall-health | mail -s...
I've been using SSTMP on a local FreeBSD machine to send stuff like the output of certain cron jobs to my "real" main email account, which is not hosted on the same machine (or even domain). For example, I have a daily cron job set up as so:
smartctl -a /dev/ada0 | grep overall-health | mail -s "Silicon daily smartctl" bob@vesterman.com
This works fine, insofar as the mail being successfully delivered to my "real" email account. However, every time I send a message, I also receive a bunch of warning and bounce messages from my "real" email account's mail system.
I found that `mail
has a "verbose" flag,
-v
`, which shows the conversation between my SSMTP and the host of my "real" email account. I tried it out, and noticed the following interesting portion:
[->] RCPT TO:
[] RCPT TO:
[] RCPT TO:
[] RCPT TO:
[] RCPT TO:
[<-] 250 Accepted
So SSMTP is saying that the message should be sent not only to the intended recipient, but also to three other addresses? And one of them is especially weird looking ("/usr/local/sbin/ssmtp@vesterman.com"), and for some reason that one gets *two* RCPT TO lines.
I have no idea where these "extra" RCPT TO lines are coming from. Anyone have any idea? Thanks.
Contents of my /usr/local/etc/ssmtp/ssmtp.conf:
root=bob@vesterman.com
mailhub=mail.vesterman.com:465
rewriteDomain=vesterman.com
hostname=silicon.vestertopia.net
FromLineOverride=YES
UseTLS=YES
AuthUser=robotsender@vesterman.com
AuthPass=hunter2
Bob Vesterman
(277 rep)
Feb 1, 2023, 11:36 PM
• Last activity: Feb 2, 2023, 04:19 AM
0
votes
1
answers
278
views
How to print the entire contents of a sent mail for debug purposes?
I try to see the raw data of a mail that I sent with `mail -s "My Subject" me@example.org`. Is it possible, if so, how? Expected output is similar to: ``` From: "root" To: me@example.org Subject: My Subject Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable My B...
I try to see the raw data of a mail that I sent with
mail -s "My Subject" me@example.org
.
Is it possible, if so, how?
Expected output is similar to:
From: "root"
To: me@example.org
Subject: My Subject
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
My Body
Martin Braun
(287 rep)
Jan 29, 2023, 11:19 PM
• Last activity: Jan 30, 2023, 12:47 AM
1
votes
1
answers
278
views
How to move/rename user mbox file with mailutils?
Is there a way to change the `~/mbox` file where `mailutils`'s `mail` program saves read mail and where `mail -f` reads from to something else, like `~/.mbox` for example? I read that setting the `MBOX` environment variable does this but I tried setting it to both `~/.mbox` and `$HOME/.mbox` and nei...
Is there a way to change the
~/mbox
file where mailutils
's mail
program saves read mail and where mail -f
reads from to something else, like ~/.mbox
for example? I read that setting the MBOX
environment variable does this but I tried setting it to both ~/.mbox
and $HOME/.mbox
and neither did anything for me. For reference, I tried setting MBOX
both just by setting it in the current terminal session and by using the env
command, and neither worked.
tdeary
(11 rep)
Feb 27, 2020, 12:13 AM
• Last activity: Dec 25, 2022, 11:14 PM
3
votes
1
answers
1074
views
18.04.1-Ubuntu: Mail command unable to set mail body with attachment
I am trying to use `mail` command to send 2 attachments. The issue which i am facing is unable to send attachment and mail body content. tried following command ``` echo "Hello World" | mail -s 'Test Email' -A test.csv -aFrom:no-reply@test.com abcd@test.com ``` ``` cat README.txt | mail -s 'Test Ema...
I am trying to use
mail
command to send 2 attachments. The issue which i am facing is unable to send attachment and mail body content. tried following command
echo "Hello World" | mail -s 'Test Email' -A test.csv -aFrom:no-reply@test.com abcd@test.com
cat README.txt | mail -s 'Test Email' -A test.csv -aFrom:no-reply@test.com abcd@test.com
mail -s 'Test Email' -A test.csv -aFrom:no-reply@test.com abcd@test.com < README.txt
Whereas I send mail body alone then mail is received with body
mail -s 'Test Email' -aFrom:no-reply@test.com abcd@test.com < README.txt
How to send both attachment and mail body (README.txt
in mail body and test.csv
in attachment)?
Murugan M
(31 rep)
May 17, 2019, 04:20 AM
• Last activity: Dec 7, 2022, 05:00 PM
Showing page 1 of 20 total questions