Add anything@your.onion aliases (for sending and receiving)
This commit is contained in:
@ -41,7 +41,7 @@ inet_protocols = all
|
||||
#relay_domains = onion
|
||||
relay_domains = !dhosting4okcs22v.onion onion lelantos.org mail2tor.com anoninbox.net anonplus.org o3mail.org volatile.ch danwin1210.me
|
||||
home_mailbox = Maildir/
|
||||
canonical_maps = regexp:/etc/postfix/canonical
|
||||
canonical_maps = proxy:mysql:/etc/postfix/sql/alias.cf regexp:/etc/postfix/canonical
|
||||
ignore_mx_lookup_error = yes
|
||||
always_add_missing_headers = yes
|
||||
message_drop_headers = bcc content-length resent-bcc return-path x-mailer received x-originating-ip x-original-to user-agent
|
||||
|
@ -1 +1,2 @@
|
||||
/(.*)@dhosting4okcs22v.onion/ $1@dhosting4okcs22v.onion
|
||||
/@([a-z2-7]{16}).onion/ $1.onion@dhosting4okcs22v.onion
|
||||
|
5
etc/postfix/sql/alias.cf
Normal file
5
etc/postfix/sql/alias.cf
Normal file
@ -0,0 +1,5 @@
|
||||
user = postfix
|
||||
password = MY_PASSWORD
|
||||
hosts = localhost
|
||||
dbname = hosting
|
||||
query = SELECT '%d@dhosting4okcs22v.onion' FROM users WHERE '%d' = CONCAT(onion, '.onion')
|
@ -69,7 +69,7 @@ chdir = /
|
||||
pm = ondemand
|
||||
pm.max_children = 8
|
||||
pm.process_idle_timeout = 10s;
|
||||
php_admin_value[sendmail_path] = '/usr/bin/php /var/www/sendmail_wrapper.php \"$onion <$onion.onion@" . ADDRESS . ">\" | /usr/sbin/sendmail -t -i'
|
||||
php_admin_value[sendmail_path] = '/usr/bin/php /var/www/sendmail_wrapper.php \"$onion.onion <$onion.onion@" . ADDRESS . ">\" | /usr/sbin/sendmail -t -i'
|
||||
php_admin_value[memory_limit] = 128M
|
||||
php_admin_value[disable_functions] = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,exec,passthru,shell_exec,system,popen,proc_open,socket_listen,socket_create_listen,socket_bind,stream_socket_server,fsockopen,pfsockopen,posix_kill,php_uname,link,symlink,posix_uname
|
||||
php_admin_value[open_basedir] = /home/$onion.onion
|
||||
@ -101,7 +101,7 @@ php_admin_value[session.save_path] = /home/$onion.onion/tmp
|
||||
chgrp("/var/lib/tor-instances/$firstchar/hidden_service_$onion.onion/private_key", "_tor-$firstchar");
|
||||
//add hidden service to torrc
|
||||
$torrc=file_get_contents("/etc/tor/instances/$firstchar/torrc");
|
||||
$torrc.="HiddenServiceDir /var/lib/tor-instances/$firstchar/hidden_service_$onion.onion/\nHiddenServicePort 80 127.0.0.1:80\n";
|
||||
$torrc.="HiddenServiceDir /var/lib/tor-instances/$firstchar/hidden_service_$onion.onion/\nHiddenServicePort 80 127.0.0.1:80\nHiddenServicePort 25 127.0.0.1:25\n";
|
||||
file_put_contents("/etc/tor/instances/$firstchar/torrc", $torrc);
|
||||
//remove from to-add queue
|
||||
$del->execute([$onion]);
|
||||
@ -124,7 +124,7 @@ foreach($onions as $onion){
|
||||
unlink("/etc/nginx/sites-enabled/$onion[0].onion");
|
||||
//clean torrc from user
|
||||
$torrc=file_get_contents("/etc/tor/instances/$firstchar/torrc");
|
||||
$torrc=str_replace("HiddenServiceDir /var/lib/tor-instances/$firstchar/hidden_service_$onion[0].onion/\nHiddenServicePort 80 127.0.0.1:80\n", '', $torrc);
|
||||
$torrc=str_replace("HiddenServiceDir /var/lib/tor-instances/$firstchar/hidden_service_$onion[0].onion/\nHiddenServicePort 80 127.0.0.1:80\nHiddenServicePort 25 127.0.0.1:25\n", '', $torrc);
|
||||
file_put_contents("/etc/tor/instances/$firstchar/torrc", $torrc);
|
||||
//delete hidden service from tor
|
||||
unlink("/var/lib/tor-instances/$firstchar/hidden_service_$onion[0].onion/hostname");
|
||||
|
@ -19,7 +19,9 @@ echo '<li><b>No Web-based file management yet, you\'ll need to use an FTP client
|
||||
echo '<li>FTP access</li>';
|
||||
echo '<li>SFTP access</li>';
|
||||
echo '<li>No disk quota</li>';
|
||||
echo '<li>mail() can send e-mails from your.onion@' . ADDRESS . ' and you get imap, pop3 and smtp access</li>';
|
||||
echo '<li>mail() can send e-mails from your.onion@' . ADDRESS . ' (your.onion@hosting.danwin1210.me for clearnet)</li>';
|
||||
echo '<li>Webmail and IMAP, POP3 and SMTP access to your mail account</li>';
|
||||
echo '<li>Mail sent to anything@your.onion gets automatically redirected to your inbox</li>';
|
||||
echo '<li>Your own .onion address</li>';
|
||||
echo '<li>There is a missing feature or you need a special configuration? Just <a href="http://tt3j2x4k5ycaa5zt.onion/contact.php">contact me</a> and I\'ll see what I can do.</li>';
|
||||
echo '<li>Empty accounts will be deleted after a month</li>';
|
||||
|
Reference in New Issue
Block a user