Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Tipp gesucht: Emailweiterleitung auf externes Mailfach
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum
View previous topic :: View next topic  
Author Message
artbody
Guru
Guru


Joined: 15 Sep 2006
Posts: 489
Location: LB

PostPosted: Mon Sep 09, 2013 8:49 am    Post subject: Tipp gesucht: Emailweiterleitung auf externes Mailfach Reply with quote

Ich hab einen rootServer mit mehreren vhostdomains am laufen
Alle dort eingehenden Mails (ich@domain1 ich@domain2 ...) gehen per Weiterleitung ohne lokale Speicherung auf ein externes Emailfach (ich@Gmail).

Seither hatte ich immer das vom Provider mit installierbare plesk als Verwaltungsoberfläche benutzt.

Nun habe ich vor ein Gentoo dort aufzusetzen und bin an der Frage wie ich das Mailsystem aufsetze.

Gibt es da ein ganz billigen (Zeitsparenden) Trick um einfach ohne viel Zusätzlichen Aufwand .. ungescannt alle eingehenden Mails auf mein externes Emailfach weiter zu leiten?

lg
_________________
Never give up
WM : E16 the true enlightenment
achim
Back to top
View user's profile Send private message
l3u
Advocate
Advocate


Joined: 26 Jan 2005
Posts: 2540
Location: Konradsreuth (Germany)

PostPosted: Sat Oct 19, 2013 11:11 am    Post subject: Reply with quote

Ich habe kürzlich einen kleinen lokalen SMTP-Server in Python geschrieben, der alle E-Mails, die reinkommen, unter Verwendung eines externen Postfachs verschickt. Ist das evtl. das, was du suchst? Ich hab den Code grad nicht da, aber im Prinzip ist es http://pymotw.com/2/smtpd/ und dann, in der Funktion, die die eingehende E-Mail verarbeitet, das, was unter http://docs.python.org/3.3/library/smtplib.html beschrieben ist. Also quasi:
Code:
#!/usr/bin/python3

from smtplib import SMTP
import smtpd
import asyncore

smtp = SMTP()

class CustomSMTPServer(smtpd.SMTPServer):
   
    def process_message(self, peer, mailfrom, rcpttos, data):
        smtp.connect('mail.gmx.net', 587)
        smtp.ehlo()
        smtp.starttls()
        smtp.ehlo()
        smtp.login('user', 'pass')
        smtp.sendmail(mailfrom, rcpttos, data)
        smtp.quit()
        return()

server = CustomSMTPServer(('hier die lokale IP, nicht 127.0.0.1', 1025), None)

asyncore.loop()


Den daemon starte ich per init-Script, das legt dann auch automatisch ein PID-File an, startet das Programm und sorgt dafür, dass es nur ein Mal läuft (vgl. http://big-elephants.com/2013-01/writing-your-own-init-scripts/ ).

Prinzipiell würd ich halt „einfach“ Postfix aufsetzen. So, wie sich das für einen Server gehört ;-)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum