• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Setting up Mail Server

Lego

Well-Known Member

Thanks: 1
Messages: 404

#26
ok awesome! lol, I forgot to update my nameserver IP at godaddy so it'll be another day or so before i can try.
 

Lego

Well-Known Member

Thanks: 1
Messages: 404

#27
DutchDaemon said:
If you're using virtusertable you must include all domains and hostnames in local-host-names. Then restart sendmail ([cmd=]/etc/rc.d/sendmail restart[/cmd]). You should also put corresponding entries in virtusertable to handle email addresses under those domains/hostnames.
Wait, ok does that mean all i need in the local-host-names file is mx.blurr-ink.com or mx.blurr-ink.com and blurr-ink.com?? Blurr-ink.com is the only domain and my hostname is set to blurr-ink.com.

----------------------------------------------
Also, I just added the postmaster@mx.blurr-ink.com to the virtusertable:
Code:
root@blurr-ink.com                   root
@blurr-ink.com                       Lego
postmaster@mx.blurr-ink.com          Lego
removed the mail entry from my dns record.
changed my local-host-names file to:
Code:
blurr-ink.com
mx.blurr-ink.com
Ran Make in /etc/mail, and restarted bind & sendmal. and that should be it right? I really do appreciate the help, the mail has been the one thing I haven't been able to get working in any form up until now.

Also, is there anyway I can stop my outgoing mail from ending up in hotmail/yahoo junk/spam box??
 

DutchDaemon

Administrator
Staff member
Administrator
Moderator

Thanks: 2,478
Messages: 11,090

#28
Your settings in local-host-names and virtusertable are now correct. I have no idea how that spam box stuff works at Hotmail/Yahoo. Isn't there a way to mark those emails as 'not junk' or 'not spam', so the filter will learn not to consider them junk/spam over time?
 

Lego

Well-Known Member

Thanks: 1
Messages: 404

#29
hmm.. I think so, I'll check into that. Again, I can't thank you enough for the help getting this setup correctly. Now hopefully, by tomorrow my DNS will be finished resolving, and I'll be able to test sending mail back. Oh, and because I have 127.0.0.1 as the only listed 'OK' in the access file that means nobody can use my mail server to relay and spam out, right?
 

DutchDaemon

Administrator
Staff member
Administrator
Moderator

Thanks: 2,478
Messages: 11,090

#30
That's right.

Sendmail won't relay email for anyone by default. Each IP address you want to grant relay possibilities must be put in /etc/mail/access with 'RELAY' as the second field ('OK' means: 'accept email from', 'RELAY' means: 'relay email for').

You would typically put the IP addresses of a LAN there. I don't think you will need that 127.0.0.1 line in there, either with OK or RELAY, because Sendmail itself is running there.
 

Lego

Well-Known Member

Thanks: 1
Messages: 404

#31
ok, cool. well I'll leave it for now. But I don't need the LAN IP added right, because Im not relaying. I just plan on always sending from webmin, or roundcube, and everything is on the same system, so nothing is really getting relayed, I have been able to send mail from both computers (server and my other system) logged into webmin.

oh and I figured out how to set my mail to not go to the spam box. but Im not sure if that filter will only apply to me or everyone.
 

ph0enix

Well-Known Member

Thanks: 5
Messages: 325

#33
Lego said:
what Im trying to do is setup a mail server so I can use email addresses from my site/server. Im running my nameserver/apache for my TLD and want to handle mail aswell. so blurr-ink.com is my website, and my email would be Dan@blurr-ink.com

I did plan on installing both of those programs, but how can someone spam out of my server If im the only person sending emails from it? is that even possible, If i am the only person with an account??

Um I didn't have the reverse dns setup, do those entries go in the normal hosts file with the other entries or in a separate file?

My ip isn't static but the lease is long enough that even if i have to reboot the router I keep the same IP. Although, i believe i can request a static ip.

ouch.. ok didn't realize I needed to contact my ISP about it...So it won't work atall until i get that setup?
If all you need is to be able to send/receive mail to/from @blurr-ink.com, then look into using Google Apps (standard edition). It's free, reliable and will save you a lot of headache that comes with hosting your own mail server but if you're doing this so you can learn then it's a completely different story.

J.
 

Lego

Well-Known Member

Thanks: 1
Messages: 404

#34
Thanks for the reply; yes its more of a learning process, but Also to use it. I host my ssh, ftp, http, Also have webmin & phpMyAdmin. So why not try and get a mail server running (with roundcube); I don't know, I enjoy having my own personal webspace that I don't have to pay for and can do whatever I want with. And, its a challenge its something I have never done with a computer, I enjoy expanding my computer knowledge.

What exactly does google apps do?

Either way, I am able to send out now, But for some unknown reason I can't send in yet, i try to reply to the recieved message in yahoo and after a day or so I get this:
Code:
Hi. This is the qmail-send program at yahoo.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

<Lego@blurr-ink.com>:
Sorry, I wasn't able to establish an SMTP connection. (#4.4.1)
I'm not going to try again; this message has been in the queue too long.

--- Below this line is a copy of the message.

Return-Path: <champagne_dan@yahoo.ca>
Received: (qmail 95342 invoked by uid 60001); 18 Jun 2009 06:29:04 -0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.ca; s=s1024; t=1245306544; bh=JClW8JjhpBBHmeTI6HyL7/13BDaFq973XiMeRZ22yWY=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=LVrzY2b2XDChGryrK+fYc0CnBUHy7RkRWmoC6VwXgNHw+P1/zNTIqfnXsE4vBD7PA7sEnOrrQTrk9THVU5dHnCL8YAOiwaIZCtFh7y/L4Ngq5isydNcD7QJGWGrmNezgz8LFtgM+NTPTKE5ZrXs2/anVgPP0olH8SsRAVIBbHpI=
DomainKey-Signature:a=rsa-sha1; q=dns; c=nofws;
  s=s1024; d=yahoo.ca;
  h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type;
  b=ZbahBCPImZY9qrHrQjmxTy+mo9wF0DACTVJkmS89qs/hlcgqlH31RW585ZxA4IqkeLJQuU0U5DnIRMobq9R2bCyAXv9G29xWPT5YeTpY1NLjJG1DgFjUuikpGAJUJ+EWtv4XPM79rDXKVy8GPniavhsrBIy2L/WUlFY524S9scM=;
Message-ID: <472084.93203.qm@web53204.mail.re2.yahoo.com>
X-YMail-OSG: Y.UnhhAVM1l6R9B7HwBnH7tvNFUYwsD2wL9gMt3xm2f.hlvrnRscSZdjHVgKfcRZ4klQJWN1xaVIDqiVSn0RuQ23znDl04THT_TFZViCYpq7OlXF7kpyTZvyTMG5cwnyYkImnnGnMivcbzWCHYn2RP9wRx3cZI3zXSF5R0ui9xUYjwiN4vpil4YM_E0XarrSgKAhm8E3w2wQtAtZZgorM13ti7l7ePYthH.xUuAddljInpR6YjzLlT0n28aPiL9cimUk7GcUC3vixqdR6J3v78gatRkHDGvRawsYbQtSB2w4E_ZkDawhVLYPu_AHgxqmp1NKdyBXCKnn0Ed0y6M_7qJi
Received: from [216.8.133.121] by web53204.mail.re2.yahoo.com via HTTP; Wed, 17 Jun 2009 23:29:04 PDT
X-Mailer: YahooMailClassic/5.4.12 YahooMailWebService/0.7.289.15
Date: Wed, 17 Jun 2009 23:29:04 -0700 (PDT)
From: Dan Champagne <champagne_dan@yahoo.ca>
Subject: Re: Trying to mark as not spam
To: Lego@blurr-ink.com
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii


TESTING!!!

--- On Sat, 6/13/09, Lego@blurr-ink.com <Lego@blurr-ink.com> wrote:

> From: Lego@blurr-ink.com <Lego@blurr-ink.com>
> Subject: Trying to mark as not spam
> To: champagne_dan@yahoo.ca
> Received: Saturday, June 13, 2009, 1:25 PM
> Trying to mark as not spam
>
 

Lego

Well-Known Member

Thanks: 1
Messages: 404

#35
hotmail:
Code:
Delivery Status Notification (Delay)‏
From:  postmaster@mail.hotmail.com  
Sent: June 18, 2009 11:33:25 AM 
To:  champagne_dan@hotmail.com 
  2 attachments   
 details00...txt (0.2 KB), RE TESTIN...mht (1.5 KB)  
 

This is an automatically generated Delivery Status Notification. THIS IS A WARNING MESSAGE ONLY. YOU DO NOT NEED TO RESEND YOUR MESSAGE. Delivery to the following recipients has been delayed. lego@blurr-ink.com   


--Forwarded Message Attachment--
From: champagne_dan@hotmail.com
To: lego@blurr-ink.com
Subject: RE: TESTING
Date: Wed, 17 Jun 2009 23:29:38 -0700








TESTING!!!
 
> From: Lego@blurr-ink.com
> Subject: TESTING
> To: champagne_dan@hotmail.com
> CC: 
> Date: Sat, 13 Jun 2009 13:59:09 -0400
> 
> TESTING....
Do I possibly need Domain Routing, Domain Mapping, or Domain Masquerading setup? Im just looking at things in the sendmail server section of webmin..

I also just sent a message to root@blurr-ink.com to see if that makes a difference but I haven't recieved it yet either...
 

DutchDaemon

Administrator
Staff member
Administrator
Moderator

Thanks: 2,478
Messages: 11,090

#36
Your smtp port is closed. What is the output of [cmd=]sockstat -l4 -p 25[/cmd] and [cmd=]netstat -an | grep \\.25[/cmd]? If port 25 shows up in both (and on all IP addresses ("*")), your ISP may be filtering port 25. It's not uncommon on dynamic IP ranges. Some ISPs require you to put their smtp server as a backup MX, which will in turn send the email on to you.
 

Lego

Well-Known Member

Thanks: 1
Messages: 404

#37
Hmm, well my provider assures me none of my ports are blocked on there end. I made sure I asked multiple people before registering for service; So I hope thats not the issue.

Here's the outputs:
Code:
$ sockstat -l4 -p 25
USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS
root     sendmail   19346 4  tcp4   127.0.0.1:25          *:*
$ netstat -an | grep \\.25
tcp4       0      0 127.0.0.1.25           *.*                    LISTEN
$
If that looks correct how would I put there mx server as one of my backups? That would be the in.mnsi.net??

I Also just checked to make sure port 25 was forwarded to my server and it is.
 

Lego

Well-Known Member

Thanks: 1
Messages: 404

#38
I was reading: http://www.linode.com/irc/logs/linode.log-2006-11-13. Its an IRC thread, and in there it says if I configure postfix to use ssl on port 465 that would solve the problem, obviously Im using sendmail so I would configure sendmail to use ssl on port 465 but will that actually solve the problem?? I know I have certificates I made for like webmin, and what not, all signed by blurr-ink.com can I use those?
 

DutchDaemon

Administrator
Staff member
Administrator
Moderator

Thanks: 2,478
Messages: 11,090

#39
Your sendmail is only running on localhost, not on your public IP address, so the outside world can't get to it (with or without port-forwarding).

You'll have to put this in /etc/rc.conf
Code:
sendmail_enable="YES"
and restart sendmail. Then it will start the sendmail daemon on all interfaces, making it possible to receive email on your Internet IP address.

The entire Postfix/SSL reference is beyond me. It has nothing to do with solving the problem with receiving email on port 25. Try not to use too many hammers on one nail. You'll lose track.
 

Lego

Well-Known Member

Thanks: 1
Messages: 404

#40
lol, good idea. geez, I forgot I removed that when I was getting the error with bind.ok, done.

Code:
blurr-ink# sockstat -l4 -p 25
USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS
root     sendmail   33931 4  tcp4   *:25                  *:*
blurr-ink# netstat -an | grep \\.25
tcp4       0     54 192.168.1.101.25       65.55.90.24.45396      FIN_WAIT_1
tcp4       0      0 *.25                   *.*                    LISTEN
blurr-ink#
does that look better now?
 

Lego

Well-Known Member

Thanks: 1
Messages: 404

#41
Absolutely amazing!!!! It worked, well sort of. Im now able to email root@blurr-ink.com, but yahoo gives this error when sending to Lego:
Code:
Hi. This is the qmail-send program at yahoo.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

<Lego@blurr-ink.com>:
216.8.133.114 does not like recipient.
Remote host said: 550 5.1.1 <Lego@blurr-ink.com>... User unknown
Giving up on 216.8.133.114.

--- Below this line is a copy of the message.

Return-Path: <champagne_dan@yahoo.ca>
Received: (qmail 4381 invoked by uid 60001); 20 Jun 2009 13:48:59 -0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.ca; s=s1024; t=1245505739; bh=QGggaisavExibAXze589IzmrcmcEViOvh6JewskKpIk=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=e5AtKKOyFiCfqfNPZMiqFktKvHW0K0dTT00G5JP7BaiuDvqkFn3rv7Ntj/4qeZPAn4d7xyFnYcfZ5xS/Nggk+NBXAGOTcRvgUiW2I4iwYQ8VEgCGfD3/tybLXWulSf+YA+Er5dmZInjucrbtODhCVRPBnYC+WSy+5abxxng/ywY=
DomainKey-Signature:a=rsa-sha1; q=dns; c=nofws;
  s=s1024; d=yahoo.ca;
  h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type;
  b=ytwGRUUoqNvyICxsU0+VeXkUzAqLaEVh8pV3ZXaN++6CYwSg1inYVh5OF1AwiIJlTCzGXsxhxi1bb3gZ4968OlFI5G5ErUHbySAK8lqS+HpAkFgPbfOXpUK27tT1nDrM+HivYmr6aFaYPB0BL6asumeqkYM+8NQb8G8+IRJD/Ys=;
Message-ID: <465593.2262.qm@web53202.mail.re2.yahoo.com>
X-YMail-OSG: bQHhrd8VM1lUrn0aVlfnFHxK6ygE2UcJk1iZjo0pjxKoqZo0J2JDzesAKiQss_nS0Nh5_0G2ibs1M2HsPnIB9c1EaWhhpEFbjA.EvGkfIk0XSa9KwrIxvfQpKFSTdgasOCxPuayvvsZzVZZA2xnH.GwQsCO1if7HpXcM0BQdrEAWmr507d.P84mGxGaCLeTlpiywZN8cufw7..tmmcRZLzW2BvoyUzYK4q2LQozMyJNxrxqwBvPRNixF17z4moMyJ7vWbUNfPalOgjuRRz774Z1Tio3G6VmymCANwr.UOLsNFbs.nvvKxOuWzjLKrFthFn1r4hsEm1cH3XZa52vfFPRzJYieRv3.t0yQxov6c8BWc46UR1vXizk-
Received: from [216.8.133.114] by web53202.mail.re2.yahoo.com via HTTP; Sat, 20 Jun 2009 06:48:59 PDT
X-Mailer: YahooMailClassic/5.4.17 YahooMailWebService/0.7.289.15
Date: Sat, 20 Jun 2009 06:48:59 -0700 (PDT)
From: Dan Champagne <champagne_dan@yahoo.ca>
Subject: TESTING1.2.3
To: Lego@blurr-ink.com
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii


1.2.3.
Unknown user? its a local user do I have to create a special alias for Lego?
 

DutchDaemon

Administrator
Staff member
Administrator
Moderator

Thanks: 2,478
Messages: 11,090

#42
If you have [email='Lego@blurr-ink.com]'Lego@blurr-ink.com[/email]' (or a catch-all [email='@blurr-ink.com]'@blurr-ink.com[/email]') in /etc/mail/virtusertable (with a valid mailbox as the second field -- mailbox names are case-sensitive!) and 'blurr-ink.com' in /etc/mail/local-host-names, it should work.
 

Lego

Well-Known Member

Thanks: 1
Messages: 404

#44
ok, um. Well my system user is "Lego"; under read user mail the mailbox is called "Lego" (looking at it from webmin); So I assumed it would just be Lego@blurr-ink.com. Um I do have the 'catch all' situation in the virtusertable "@blurr-ink.com" (how it looks in post #27, this thread). And, I do also have blurr-ink.com in the local-host-names (the same way as in post #27, this thread).
 

Lego

Well-Known Member

Thanks: 1
Messages: 404

#45
this is the output for the sendmail syntax you gave:
Code:
blurr-ink# sendmail -bv Lego@blurr-ink.com
me@my.domain... deliverable: mailer esmtp, host my.domain, user me@my.domain
blurr-ink# sendmail -bv root@blurr-ink.com
root@blurr-ink.com... deliverable: mailer local, user root
blurr-ink#
 

Lego

Well-Known Member

Thanks: 1
Messages: 404

#46
Ok I just send a mail from yahoo and hotmail both were to root@blurr-ink.com, and CC to Lego@blurr-ink.com BCC lego@blurr-ink.com and in my root mailbox I receive the message for root but Also receive this:
Code:
The original message was received at Sun, 21 Jun 2009 19:51:30 -0400 (EDT)
from localhost

   ----- The following addresses had permanent fatal errors -----
<champagne_dan@hotmail.com>
    (reason: 550 DY-001 Mail rejected by Windows Live Hotmail for policy reasons.
We generally do not accept emai...l/network admins, please visit http://postmaster.live.com
for email delivery information and support)

   ----- Transcript of session follows -----
... while talking to mx3.hotmail.com.:
>>> MAIL From:<> SIZE=2802
<<< 550 DY-001 Mail rejected by Windows Live Hotmail for policy reasons. We generally
do not accept email from dynamic IP's as they are not typically used to deliver unauthenticated
SMTP e-mail to an Internet mail server. http://www.spamhaus.org maintains lists of
dynamic and residential IP addresses. If you are not an email/network admin please
contact your E-mail/Internet Service Provider for help. Email/network admins, please
visit http://postmaster.live.com for email delivery information and support
554 5.0.0 Service unavailable
That doesn't make much sense to me.. how does hotmail/yahoo send the email to root@blurr-ink.com fine. but then gives me this error in my root@blurr-ink mailbox that it can't send it to Lego!?!?!?! I receive a similar message from yahoo with the same results. root receives but Lego doesn't; Um whats weirder is neither hotmail or yahoo give me the postmaster error in my hotmail/yahoo mailbox.. it shows up in my root@blurr-ink.com mailbox! this so confusing...

I hope this all makes sense, like I'm explaining it right..
 

DutchDaemon

Administrator
Staff member
Administrator
Moderator

Thanks: 2,478
Messages: 11,090

#47
Lego said:
this is the output for the sendmail syntax you gave:
Code:
blurr-ink# sendmail -bv Lego@blurr-ink.com
[B]me@my.domain... deliverable: mailer esmtp, host my.domain, user me@my.domain[/B]
blurr-ink# sendmail -bv root@blurr-ink.com
root@blurr-ink.com... deliverable: mailer local, user root
blurr-ink#
You'll have to figure out where that comes from (hosts, aliases?), because it is obviously incorrect, and that's why email to that address bounces. When set up correctly, it will look just like the root@ line, only with Lego@ in its place.
 

DutchDaemon

Administrator
Staff member
Administrator
Moderator

Thanks: 2,478
Messages: 11,090

#48
Lego said:
Ok I just send a mail from yahoo and hotmail both were to root@blurr-ink.com, and CC to Lego@blurr-ink.com BCC lego@blurr-ink.com and in my root mailbox I receive the message for root but Also receive this:
[snip]

The email to the Lego@ address bounces back, and since it bounces back directly from a dynamic IP address, it gets refused for policy reasons. Solve the Lego@ bounces (the way the address is handled on your server is not correct) and this problem will go away.
 

Lego

Well-Known Member

Thanks: 1
Messages: 404

#50
Well, I didn't figured out whats wrong, but did get something. Its not recongizing my system user. Because, I added to the virtusertable:
Code:
lego@blurr-ink.com  root
Then I was able to receive the mail, it went to the root box instead of Lego, So why won't it send to Lego? the username is "Lego" like when I boot the machine and login, and even under the users screen and mailboxes its Lego but nothing seems to send to that Box, I have added Lego to the trusted users list aswell.