Question

I can't get emails to work :(

Hello i have been trying all day to get emails to work and I am totally lost.

PLEASE PLEASE PLEASE could some one help me.

I have set up a domain which is my own name rickyspires.co.uk and i would like to have an email address for that domain like mail@ or info@.

I have set up the domain and that all works. My droplet is called spangler1 and my login name has changed from root to rickyspires.

This is what i have tried.

I have followed this tutorial http://www.youtube.com/watch?v=kdio_MMNqUE

  • First login to the server rickyspires@spangler1:

  • install postfix sudo apt-get update sudo apt-get install postfix

  • config the main.cf file cd /etc/postfix/ sudo nano main.cf

myhostname = rickyspires.co.uk virtual_alias_maps = hash:/etc/postfix/virtual alias_database = hash:/etc/aliases mydestination = rickyspires.co.uk, spangler1, ricky-spiress-MacBook-Pro.local, localhost relayhost = mynetworks = 127.0.0.0/8 10.0.0.0/8 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all

sudo service postfix restart

  • try sending a test email

rickyspires@spangler1:/etc/postfix$ telnet 127.0.0.1 25 Trying 127.0.0.1… Connected to 127.0.0.1. Escape character is ‘^]’. 220 rickyspires.co.uk ESMTP Postfix (Ubuntu)

mail to: spangler1@rickyspires.co.uk
501 5.5.4 Syntax: MAIL FROM:<address>

mail from: rickyspires@rickyspires.co.uk (root@rickyspires.co.uk) 250 2.1.0 Ok

rcpt to: spangler1@rickyspires.co.uk 550 5.1.1 spangler1@rickyspires.co.uk: Recipient address rejected: User unknown in local recipient table

!!! I GET AN ERROR HERE - the error wasnt there before ? But even when i didnt get the error at this point the emails would not send.

I get this… for example

From MAILER-DAEMON Sun Oct 21 07:17:27 2012 X-Original-To: rickyspires@ricky-spiress-MacBook-Pro.local Delivered-To: rickyspires@ricky-spiress-MacBook-Pro.local Date: Sun, 21 Oct 2012 07:17:27 +0100 (BST) From: MAILER-DAEMON@ricky-spiress-MacBook-Pro.local (Mail Delivery System) Subject: Undelivered Mail Returned to Sender To: rickyspires@ricky-spiress-MacBook-Pro.local Auto-Submitted: auto-replied MIME-Version: 1.0 Content-Type: multipart/report; report-type=delivery-status; boundary=“DDE412BC182.1350800247/ricky-spiress-MacBook-Pro.local” Content-Transfer-Encoding: 8bit

ANY IDEAS ?

Thanks Ricky


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hello Roberto

I hope your well.

That’s really good advice.

Thank you so much

Rick

Hey Ricky,

I think you might not have configured your e-mail users yet (they’re different from your users on your box). Check out this guide https://www.digitalocean.com/community/tutorials/how-to-configure-a-mail-server-using-postfix-dovecot-mysql-and-spamassasin

On my droplet I used a different approach: I’m using a third-party provider for e-mail.

I found managing an e-mail server a bit of a hassle so I just use Gmail SMTP for sending e-mail from my box. Unfortunately Google Apps for business are no longer free. An option could be to use Outlook.com to host your e-mail, and then use the SMTP provided by them to send e-mail from your box. If you want to follow that approach you might start with these links

I hope that helps