Questions tagged [msmtp]

an open-source SMTP client

In the default mode, it transmits a mail to an SMTP server (for example at a free mail provider) which takes care of further delivery. To use this program with your mail user agent (MUA), create a configuration file with your mail account(s) and tell your MUA to call msmtp instead of /usr/sbin/sendmail.

Features include:

  • Sendmail compatible interface (command line options and exit codes)
  • Support for multiple accounts
  • TLS/SSL support including client certificates
  • Many authentication methods
  • Support for Internationalized Domain Names (IDN)
  • Fast SMTP implementation using command pipelining
  • DSN (Delivery Status Notification) support
  • SOCKS proxy support

msmtp is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. https://marlam.de/msmtp/

49 questions
8
votes
2 answers

msmtp and smtp account password - how to obfuscate

I configured msmtp with my gmail account. I obviously want to avoid writing my password in plaintext format in the config file. Luckily enough msmtp offer the option passwordeval which can be used to obtain the password from the output of an an…
Pie86
  • 505
  • 5
  • 15
8
votes
1 answer

How to configure msmtp with Amazon SES?

Amazon has instructions for postfix and sendmail, but not msmtp (simple SMTP client), so adding them here.
Neil McGuigan
  • 46,580
  • 12
  • 123
  • 152
5
votes
2 answers

Awk permission denied when run through msmtp

I am using gpg2 and awk jointly with msmtp to send emails in emacs. This is the relevant portion of my .msmtprc file account gmail host smtp.gmail.com from myusername@gmail.com auth on port 465 user myusername@gmail.com passwordeval gpg2 -q…
Ajned
  • 523
  • 5
  • 21
5
votes
2 answers

How to install and configure MSMTP on OSX?

Following the instructions on ArchLinux to install and configure msmtp does not work. The file /etc/ssl/certs/ca-certificates.crt or anything like it is missing, and trying to use msmtp to send mail will result in a certificate error. What is an…
okovko
  • 1,851
  • 14
  • 27
5
votes
1 answer

PHP - 553 Relaying disallowed with Zoho mail and MyBB

I'm trying to use Zoho's SMTP servers to send registration emails from a MyBB installation. However, the emails are never sent and when I check the logs I notice that the error is. Month Day Year:Hour:Minute host=smtp.zoho.com tls=on auth=on…
SLC
  • 2,167
  • 2
  • 28
  • 46
4
votes
0 answers

Is SMTP plain authentication secure when using STARTTLS?

I am writing some linux code which requires sending emails. My question is: when I do use STARTTLS (starttls on in msmtprc) is it secure to use plain authentication (auth plain)? Is the connection a) encrypted before sending the password? or b)…
Damago
  • 101
  • 6
4
votes
6 answers

linux msmtp configuration sends from shell but fails from PHP/apache

linux (fedora 20) msmtp configuration sends from shell but fails from PHP/apache, I am stumped... my objective is just to send email, through my gmail smtp from my localhost development webserver, to test output of code that sends mail php.ini…
Emily
  • 61
  • 1
  • 2
  • 5
3
votes
0 answers

email subject and bcc for crontab via msmtp

I'm currently scheduling cron jobs on my Raspberry (Buster) to run python3 code every day, and send the result via email through msmtp. 07 12 * * * python3 /home/pi/Documents/code.py 2>&1 | msmtp -a default my.email@gmail.com this works without…
Kim Chi
  • 51
  • 4
3
votes
0 answers

PHP sendmail works but as a Cronjob fails: "sh: 1: /usr/sbin/sendmail: not found"

SOLVED! Solution: adjust sendmail_path value in php_cli/php.ini as well. I'm running PHP 7.4 on Ubuntu 20.x I've installed msmtp in order to send emails with php. Problem: running mailtest.php from browser does work. running mailtest.php by a…
jan
  • 31
  • 5
3
votes
1 answer

msmtp cannot send emails with php when setting the "From"

I made a small test php script that sends an email like this: $headers = 'From: ' . $_POST["from"]; if (mail ($_POST["to"], $_POST["subject"], $_POST["body"], $headers)) { echo "Mail sent"; } else { echo "Problem sending email"; } This is…
Simon Levesque
  • 417
  • 1
  • 6
  • 13
3
votes
2 answers

crontab use msmtp to send mail failed

I want to use msmtp instead of postfix to send mail when crontab get some errors, but I failed. My OS is ubuntu 12.04 Here is my steps: apt-get install msmtp-mta #This will auto install msmtp, and symlink /usr/sbin/sendmail apt-get install…
Feng Yu
  • 1,431
  • 2
  • 18
  • 26
2
votes
2 answers

msmtp 1.8.22 override from address when sending via php

I have the following config file for msmtp account default host SES_HOST port 587 timeout 5 auth on tls on tls_starttls on tls_trust_file /etc/ssl/certs/ca-certificates.crt syslog …
Chris Muench
  • 17,444
  • 70
  • 209
  • 362
2
votes
1 answer

msmtp: GSSAPI authentication fails

I'm trying to send emails using MSMTP with NTLM or GSSAPI authentication. This works fine using the NTLM authentication, but fails while using the GSSAPI. msmtp --version Output msmtp version 1.6.6 Platform: x86_64-pc-linux-gnu TLS/SSL library:…
VikramV
  • 1,111
  • 2
  • 13
  • 31
1
vote
1 answer

How to run 'msmtp' mail command in PHP system()?

My server don't have 'postfix' to send mails from 'sendmail'. Instead, I use 'msmtp' and 's-nail' shell commands. It works well from interactive shell ('bash'). I try to send mail from PHP, but I don't receive any, and have no output nor…
1
vote
0 answers

Does msmtp client need sendmail and/or other services installed and running for it to work?

Baby steps needed for setting up msmtp on a Debian-based Docker container. I am trying to setup msmtp with system-wide configuration using /etc/msmtprc. Do I need to setup other services for msmtp to work?
1
2 3 4