I have tried so much and don't get things working.
I have a domain and no hosting/webmail so I wanted to redirect everything to my gmail account.
As I have a linux (Lubuntu 13.06) machine running I thought I could configure a mail server.
That seemed not to be so easy.
I have redirected my mail.domain.com to my ip and the port is open (I know this because while playing about, I once did receive an error message back by email from Postfix)
I am working with Postfix, however any other application is fine by me, if easier and just as safe.
I followed this instructions, however without success
http://www.java-tutorial.ch/ubuntu/forward-all-incoming-email-to-single-address
All other instructions I read on the internet were alike.
When sending a test email (not from receiver address as this is a loopback issue with gmail) I do not receive a bounce and my log files are also empty so no clue what happens.
I've got it working now.
For everyone who also wants a mail server just for forwarding mail:
nano /etc/postfix/main.cf
inet_protocols = ipv4
myhostname = mydomain.nl
virtual_alias_domains = mydomain.nl
virtual_alias_maps = hash:/etc/postfix/virtual
transport_maps = hash:/etc/postfix/transport
# catch all on your domain and send to gmail
nano /etc/postfix/virtual
#mydomain.nl mygmail#gmail.com
# transport all traffic to gmail through your isp smtp server
nano /etc/postfix/transport
gmail.com smtp:smtp.myisp.nl:25
postmap /etc/postfix/virtual
postmap /etc/postfix/transport
/etc/init.d/postfix restart
Related
I am trying to set up the most simple email server on an Amazon Linux 2 host for simple outbound mail (e.g. sending system messages). Following instructions on the net, I have installed mailx and sendmail. I am not committed to either package, I just want a simple setup with a minimal footprint. I have no problem switching to postfix if that is a better solution.
For configuration I have made the following changes.
/etc/sysconfig/sendmail:
DAEMON=no
/etc/mail/submit.cf (hostname obfuscated):
D{MTAHost}smtp.******.com
This works fine, and I am able to receive mail that is sent from the system.
There is a wrinkle. The anacron process is sending mail to the root account. However, rather than the mail being kept internal to the system it is being sent to the SMTP server. The SMTP server sends the message back to my host, which doesn't accept mail, and a loop is created when an 'undeliverable' message is send back to root on the host that doesn't accept mail.
How can I configure my system so email to root stays local and is not sent to the SMTP server? Any other 'best practices' suggestions would be welcome as well. And again, if switching to postfix is better, I am willing to do so (but will need configuration guidance).
I would like to send emails through an External SMTP Service (Yandex) with Sendmail on Ubuntu 18.04.3. I use Digital Ocean.
I set everything up: External SMTP Service, Sendmail, hostname. I added the MX record to my DNS.
~hostname
childrengo.org (my domain)
~host childrengo.org
childrengo.org has address <IP>
childrengo.org mail is handled by 10 mx.yandex.net.
I made a file with my login and password - /etc/mail/authinfo/yandex-auth :
AuthInfo:smtp.yandex.ru "U:<My login>" "I:<email>" "P:<password>" "M:<login>"
AuthInfo:smtp.yandex.ru:587 "U:<My login>" "I:<email>" "P:<password>" "M:<login>"
And than:
makemap hash /etc/mail/authinfo/yandex-auth < /etc/mail/authinfo/yandex-auth
I set up Sendmail to send emails through an External SMTP Service (Yandex).
But I have got an error in my syslog:
: STARTTLS=client, relay=smtp.yandex.ru., version=TLSv1.3, verify=FAIL, cipher=TLS_AES_256_GCM_SHA384, bits=256/256
: 05BInLgB007204: AUTH=client, available mechanisms do not fulfill requirements
: AUTH=client, relay=smtp.yandex.ru., temporary failure, connection abort
: 05BInLgB007204: to=<EMAIL>, ctladdr=<root#childrengo.org> (0/0), delay=00:11:24, xdelay=00:00:00, mailer=relay, pri=300379, relay=smtp.yandex.ru. [<IP>], dsn=4.0.0, stat=Deferred: Temporary AUTH failure
I checked this https://www.digitalocean.com/community/tutorials/how-to-send-email-through-an-external-smtp-service-with-sendmail-on-freebsd-10-1 and this https://www.digitalocean.com/community/questions/ubuntu-14-04-lamp-installed-sendmail-fatal-error-when-i-sent-first-message It did not help.
I installed cyrus-sasl*
I have the TXT records for DMARC1, spf1 and DKIM for my domain.
I have tried different users to send email. And I checked the password. I also checked the user exists.
I also don't see these errors in my mail.log and in mail.err
Do you have any idea how to fix it? Or may be how to debug it?
I installed SASL again:
sudo apt-get install sasl2-bin
service saslauthd restart
service sendmail restart
After that I had a problem with authorisation. It failed even if I was sure the login and password combination is right.
In the end I find out a tricky thing. There is an application password which you can user to let some application to login to your mail from the yandex mail provider. But if you create a mail for your domain on yandex it cannot login through smtp with a password nor with an application password. It does not know which combination is ok and just return an error.
So I removed an application password and everything works fine now. I hope this small trick also would useful for somebody.
may be you need to change droplet name to domain name.
I'm setting up an Alfresco AWS instance and trying to configure inbound email.
As per the documentation I've configured it, hosted the Alfresco mail server on port 1025, set up an iptable rule to forward port 25 --> 1025, set up an folder in Alfresco with the alias 'dropoff' and added my work email as an allowed user for sending emails. I've also ensured all the ports are open on the EC2 instance
So far so good. If I test everything from my local computer with telnet:
helo mywork.com
mail from:myname#mywork.com
rcpt to:dropoff#alfresco.mywork.com
data
From: adinihan#mywork.com
Subject: test mail from command line
this is test number 1
sent from linux box
.
Then it works. I look in the Alfresco folder and there's the test email document. However, if I use Gmail and sign into myname#mywork.com and send an email through Gmail, then it doesn't work. It sends alright and there's nothing in Alfresco logging, however the document just never appears in the Alfresco folder. The from/to address is the same as the telnet command's one.
Since I can telnet from my local computer to the instance I assume it's not an issue with ports on the EC2 instance. Why would telnet work but sending it via Gmail not?
EDIT: got an email back from Google about an hour after I sent it with the error message TLS Negotiation failed: generic::failed_precondition: starttls error (0): protocol error
EDIT 2: here are my inbound emai settings in the global properties file
# Inbound #
email.inbound.unknownUser=anonymous
email.inbound.enabled=true
email.server.enabled=true
email.server.hideTLS=false
email.server.enableTLS=true
email.server.requireTLS=false
email.server.port=1025
email.server.domain=alfresco.amritmro.com
imap.server.enabled=true
imap.server.port=1143
imap.server.host=0.0.0.0
I've been trying to install a Postfix server for handling mail for my domain. I found some nice tutorial and I was able to create email address and server responds correctly with telnet (imap and pop3 included, I also charge the config in Gmail and works correctly).
To handle POP3 and IMAP I have installed Courier
The problem comes when I try to send e-mails to myself (with external email address), I receive the following error code:
Action: failed
Status: 5.4.6
Diagnostic-Code: X-Postfix; mail for (servername) loops back to
myself
I reviewed my postfix mail.conf config, as in many webs they said that it could be because mydestination was not corectly configured. I have included the domain configuration and I still get the same error. (/etc/postfix/main.cf)
mydestination = mail.mydomain.com, domain.com, localhost
This is in a VPS, so the hostname is different to the domain name, I'm not sure if this can have any influence on the handling mail error.
Could someone help me to find where can the error be?
Thanks for your attention and your answers
You're probably sending mail to a recipient, with an email address in a zone which has an MX record, with its value a hostname, which resolves to the ip address of your mailserver, while this your server hasn't been told in its main.cf config file (behind mydestination), that it is referring to itself.
Therefore, your server is wondering why an attempt to send mail to - as it believes - another server results in finding that the ip address of that another server is its own ip address.
Update mydestination accordingly.
It helps to use the same hostname for MX record, for all zones your mailserver handles incoming mail for, as that keeps your mydestination manageable.
i have a big problem with the setup for an Domain.
The Webservices are established on our Server but the Mail functions are on a Server of an other Company when we now want send an Email over our Server he tried to send it localy insted of sending it to an other server so he give back an no account here error.
Thanks for helping me out and friendly greetings.
Edit: OS Debian 6
Imap: Courier
Send: Postfix
CP: Plesk
Further to this, we are using Plesk 11.5.3 on a setup where a single mail service is activated for all domains.
So each domain cannot have the mail service turned on or off individually.
We had the same problem as Franco, and we fixed this by running the following command for each domain that had external email:
# /usr/local/psa/bin/mail --off domain.com
Works perfectly, and removes any previously created local email addresses from Postfix.
"The problem is because the server will attempt to deliver emails for the domain name locally by default. To resolve that problem you would need to set it to use the domain name's MX record."
The simple answer is to disable mail services for the subscription.
Untick the box for "Activate mail service on domain".