Free Essay

Postfix Mailserver

In:

Submitted By arnoh
Words 461
Pages 2
POSTFIX

CONFIGURATIE
Nameserver ook instellen als mailserver

$ sudo vi /etc/bind/db.jonas.lan

MX-record toevoegen

@ IN SOA jonas.lan. root.jonas.lan. ( 2011120103 ; Serial 604800 ; Refresh 86400 ; Retry 2419200 ; Expire 604800 ) ; Negative Cache TTL
;
@ IN NS ns.jonas.lan.
@ IN A 127.0.0.1
@ IN MX 5 mail.jonas.lan ns IN A 192.168.1.5 (eigen ip-adres) mail IN A 192.168.1.5

INSTALLEREN
$ sudo apt-get install postfix

Volgend venster verschijnt:

Selecteer en vul volgende zaken in:

Internet Site jonas Dit is de naam van waaruit mails zullen verstuurd worden
( jonas@mail.jonas.lan )

poortstatus controleren
$ sudo netstat –ntlp

tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN

Configuratie MAILS
$ sudo vi /etc/postfix/main.cf

Onderaan de file staat het volgende:

hostname = jonas

* Als je tijdens de installatie een verkeerde naam hebt opgegeven, kan je die hier veranderen * * maildirectory Om je mails in een directory te plaatsen moet je onderaan de file nog een lijn toevoegen:

home_mailbox = maildir/ ( willekeurige mapnaam )

mails van netwerk ontvangen
Om mails van anderen in je netwerk te kunnen ontvangen moet je volgende lijn aanvullen met je eigen netwerkadres:

mynetworks = 127.0.0.1/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.1.0/24

controles
Controleer eerst of je mailserver bereikbaar is
$ dig mail.jonas.lan

;; ANSWER SECTION: mail.jonas.lan 604800 IN A 192.168.1.5

Eventueel kan je ook op een andere pc controleren of de mailserver bereikbaar is
$ dig mail.jonas.lan @192.168.1.5

mails verzenden
Kan vanaf elke pc die verbinding kan maken met server

$ telnet 192.168.1.5 25

Trying 192.168.1.5...
Connected to 192.168.1.5
Escape character is ‘^]’.
220 ubuntu ESMTP Postfix (Ubuntu) mail from: Jonas ( willekeurige naam, als deze niet bestaat, zal de afzender
250 2.1.0 Ok unknown zijn ) rcpt to: Jonas ( moet een bestaande naam zijn )
250 2.1.5 Ok data 354 End data with <CR><LF>.<CR><LF>
Hier komt de tekst van het emailbericht
.
250 2.0.0 Ok: queued as OB66BE20D7 quit Mails lezen
$ cd maildir/new

In deze directory komen alle nieuwe mails terecht, afhankelijk van de mapnaam die je hebt opgegeven bij de installatie

$ ls
$ cat (bestand)

Return-Path: jonas@mail.jonas.lan
X-Original-To: jonas
Delivered-To: jonas@mail.jonas.lan
Received: from ns.jonas.lan (ns.jonas.lan [192.168.1.5]) by Ubuntu (Postfix) with SMTP id B01B2E20D7 for <jonas>; Sun, 4 Dec 2011 20:38:15 +0100 (CET)
Message-ID: 20111204193819.B01B2E20D7@ubuntu
Date: Sun, 4 Dec 2011 20:38:15 +0100 (CET)
From: jonas@mail.jonas.lan

Een test emailbericht

Similar Documents

Free Essay

Info for Sendmail Presentation

...sendmail info for presentation: Uses port number 25 Start and Stop service with: ALL=/sbin/service/sendmail start|stop (What Matrona had on his presentation) Start: /usr/sbin/sendmail -L sm-mta -bd -q30m (What I found on internet) Stop: kill `head -1 /var/run/sendmail.pid` (What I found on internet) configuration file path: /etc/mail/sendmail.cf Command to see what is in the mail queue: /usr/bin/mailq Command to test SMTP: telnet mail.example.net 25 Path for mail log: /var/log/maillog Command to verify sendmail is running: telnet localhost 25 how to install: Download and extract files from the sendmail website (sendmail.org) cd to where sendmail source code extracted and enter command: sh Build Confirm there are no errors and enter command: sh Build install sendmail binary should now be installed. how to configure: Create a .mc configuration file or download a sample cd to cf/cf directory. copy .mc configuration file to directory as sendmail.mc Enter command: sh Build sendmail.cf to generate sendmail.cf Enter command: sh Build install-cf Check /etc/mail for the following files: local-host-names, relay-domains, aliases, access If everything is there you can now start sendmail. What is sendmail?: "Sendmail is a general purpose internetwork email routing facility that supports many kinds of mail-transfer and -delivery methods, including the Simple Mail Transfer Protocol (SMTP) used for email transport over the Internet." http://en.wikipedia.org/wiki/Sendmail ...

Words: 290 - Pages: 2

Premium Essay

Redhat

...edhat® ® Te r r y C o l l i n g s & K u r t W a l l UR ON IT OOLS IN Y T C E CD-R L TH O ED UD M Linux Solutions from the Experts at Red Hat ® ® P R E S S™ SEC Red Hat® Linux® Networking and System Administration Red Hat® Linux® Networking and System Administration Terry Collings and Kurt Wall M&T Books An imprint of Hungry Minds, Inc. Best-Selling Books G Digital Downloads G e-Books G Answer Networks e-Newsletters G Branded Web Sites G e-Learning New York, NY G Cleveland, OH G Indianapolis, IN Red Hat® Linux® Networking and System Administration Published by Hungry Minds, Inc. 909 Third Avenue New York, NY 10022 www.hungryminds.com Copyright © 2002 Hungry Minds, Inc. All rights reserved. No part of this book, including interior design, cover design, and icons, may be reproduced or transmitted in any form, by any means (electronic, photocopying, recording, or otherwise) without the prior written permission of the publisher. Library of Congress Control Number: 2001093591 ISBN: 0-7645-3632-X Printed in the United States of America 10 9 8 7 6 5 4 3 2 1 1O/RT/QT/QS/IN Distributed in the United States by Hungry Minds, Inc. Distributed by CDG Books Canada Inc. for Canada; by Transworld Publishers Limited in the United Kingdom; by IDG Norge Books for Norway; by IDG Sweden Books for Sweden; by IDG Books Australia Publishing Corporation Pty. Ltd. for Australia and New Zealand; by TransQuest Publishers Pte Ltd. for Singapore, Malaysia, Thailand...

Words: 220815 - Pages: 884