GithubHelp home page GithubHelp logo

synox / disposable-mailbox Goto Github PK

View Code? Open in Web Editor NEW
387.0 387.0 156.0 3.87 MB

self-hosted disposable email service (php) using catch-all and imap

License: GNU General Public License v3.0

PHP 91.70% CSS 8.30%
disposable-email email-client imap imap-client php temporary-email trashmail

disposable-mailbox's People

Contributors

dabenzel avatar dependabot-preview[bot] avatar dependabot[bot] avatar dtdaft avatar gitter-badger avatar openshiftio-launchpad avatar perflyst avatar synox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

disposable-mailbox's Issues

index.php not loading correctly

Hello,
I tried to install the disposable mail system and followed the instructions on the github page, the details if've filled in are all correct but when loading the index.php it only shows a $_GET link in the url bar with the generated email box. But the page stays blank. Is there something that has to be changed, my server meets the requirements.

regards
Dave

Delete Option ?!

First i have to say thx for this amazing script.
It's simple but it does what it should ;-)

The only thing i'm missing is a option to delete a message.
Maybe its possible for you to add this?!

Aufrufen einer ImapClient Funktion aus dem Template?

Servus,
hab gerade die neusten Änderungen übernommen und hat soweit alles Funktioniert, nur bei einer Funktion hab ich ein kleines Problem.
Ich habe eine reply.template.php (ein klon des normalen fronted templates welche ich für die antwort funktion umgemodded hab), dort habe ich folgende funktion:


$mailSent = mail($mailToAddress, $mailSubject, $mailText, $mailHeader);
if($mailSent == TRUE)
    $imapClient->set_answered_flag($reply_email->id, $user);

und in der imap_client.php habe ich folgenden code:

    public function set_answered_flag(int $mailid, User $user) {
        if ($this->load_one_email($mailid, $user) !== null)
            $this->mailbox->setFlag(array($mailid), '\\ANSWERED');   
    }

allerdings hat er seit der Integration der letzten Änderungen wohl ein Problem auf diese Funktion innerhalb der $imapClient zuzugreifen.

Hast du da zufällig einen Typ wie ich die Funktion aufrufen kann aus dem template herraus?

IMAP server configuration

I am trying to set this project up on Ubuntu 16.04 container. I am running into some issues setting up the IMAP server. If i can get some guidance on how and what IMAP server you or others who have set this up with, that would be great.

What OS do you have this set up on?
What IMAP server do you use?
What configuration does the IMAP server have?

{{$ctrl.error.detail|json}}

Sorry, there was a problem.

{{$ctrl.error.desc}}

{{$ctrl.error.detail|json}}

If you are the developer you might want to check the developer tools console of your web browser and your php error logs.

Hello, this is my problem, i have moved my server, and tried to run my old temp mail. Now im getting this error, anybody could point me to the right direction?
I must say this project is now bit different, newer, since I setup my site. Any help appreciated.

Show HTML / Show Text

Great script!

I noticed however that when you click "Show HTML" to read your email, it is automatically set back to "Show Text" when the page auto refreshes. This makes it so you need to keep clicking "Show HTML"... Is there a way to have the "Show HTML" or "Show Text" be remembered so it persists through page refreshes?

Add option to disable third party cdn's

I wanna selfhost this project because it is very nice and you dont need to relay on other disposable mailboxes online which may sell your data.
The issue I see here you contact a lot third party cdn's. Can you download the css/js files into the project or add an option to disable third party?

Remove Referer on clicked links

When a user clicks on a link in a mail, the website can see the "Referer" and can thereby access the users mailbox. This has to be avoided.

Possible solutions:

Warn about missing config.php

You have to set the path to the readme in 2 files.
It would be great if there would be an clear error messeage if the config file can not be found.
Show error on browser and detailed in in errorlog.

Copying Mail button copies wrong

If I copy a mail adress with the button, it copies it with a whitespace before and after the mail adress. I think thats wrong.

Firefox 61.0.2 (64-Bit) / WIN 10

Not receiving Mails

Hi synox,

I don't receive any mails on your script, i think i configured the config.php correctly but still can receive any mails.

My Settings:

$config['imap']['url'] = '{***.com:993/imap/ssl/novalidate-cert}INBOX';
$config['imap']['username'] = "xUsername";
$config['imap']['password'] = "xPassword";

If i try to run this test.php:

<?php
$mbox = imap_open("{***.com:993/imap/ssl/novalidate-cert}", "xUsername", "xPassword");

echo "<h1>Mailboxes</h1>\n";
$folders = imap_listmailbox($mbox, "{***.com:993/imap/ssl/novalidate-cert}", "*");

if ($folders == false) {
    echo "Call failed<br />\n";
} else {
    foreach ($folders as $val) {
        echo $val . "<br />\n";
    }
}

echo "<h1>Headers in INBOX</h1>\n";
$headers = imap_headers($mbox);

if ($headers == false) {
    echo "Call failed<br />\n";
} else {
    foreach ($headers as $val) {
        echo $val . "<br />\n";
    }
}

imap_close($mbox);
?>

i get the following page

Mailboxes

{.com:993/imap/ssl/novalidate-cert}Papierkorb
{
.com:993/imap/ssl/novalidate-cert}Archiv
{.com:993/imap/ssl/novalidate-cert}Entw&APw-rfe
{
.com:993/imap/ssl/novalidate-cert}Spam
{.com:993/imap/ssl/novalidate-cert}Gesendet
{
.com:993/imap/ssl/novalidate-cert}INBOX
Headers in INBOX

Call failed

So i think the config.php is right, because i use the same configuration and the INBOX folder is on the imap server

address blacklist

Should have a address blacklist to reserve some address like admin@ administrator@ hostmaster@ postmaster@ webmaster@. Attackers can use these address to verify the domain ownership and get SSL certificate for the domain.

Prefer PlainText on Mobile Phones even Prefer HTML it set

I prefer HTML Mails;
$config['prefer_plaintext'] = false;

but on Mobile Phones i would prefer PlainText because there are lots of HTML Mails which are not responsive: http://i.epvpimg.com/kLEkbab.png

I would love to see a solution like:
Additional Config Setting:
$config['prefer_plaintext_onmobile'] = true;

And on frontend check if onmobile true and when yes if Mobile Device / Size is smaller then 768px.
When yes Show PlainText when possible no matter if prefer_plaintext is true or false.

Delay in Email showing

Hey synox,

There's something issue in Email Showing!.
I tested the working of script but the time taken in showing email on screen is too much.
It maybe an issue of refreshing code.

You can check test demo at www.viralhits.org/

Thank you

Reply to email

Sometimes it is necessary to reply to an email in the mailbox. The function should be as simple as possible.

Requirements:

  • Use built-in mail function http://php.net/manual/en/function.mail.php
  • From, To and Subject can not be changed by the user (don't trust user input)
  • To limit abuse: For each message, only one reply is allowed.
  • The feature has to be explicitly enabled by the user (disabled by default).
  • As few lines of code as possible, while keeping it simple.

Challenges:

  • Where to persist that a message has replied to? So far the application is stateless. Hint: The Flag-Feature of imap could be used.

Add dependabot to the repo

Please add dependabot to the repo. It's a free bot that regularly scans the repo for outdated dependencies and creates pull-requests to update the dependency. This is important in terms of security, because newer releases often fix bugs and security problems. Thanks in advance.

https://github.com/marketplace/dependabot

Discussion - new layout

after discussions in #54 about collapsible layout, I made a proposal for a new layout:

http://dubgo.com/tmp/frontend.html (clickable mockup)

screen shot 2018-06-17 at 22 27 34

and version 2: (simpler)
http://dubgo.com/tmp/frontend2.html
screen shot 2018-06-17 at 23 09 08

Please provide feedback.

The goals were:

  • as simple as possible, while giving explanations about the application
  • make email address copyable directly
  • make space for language selection

What to improve:

  • copy button looks bad on small screen
  • write backend function to create relative date. add tooltip for full date.

Internal Server Error without entries in error_log

Hi everyone,
I just installed disposable-mailbox on my Plesk-hostingserver (CentOS, nginx as caching server for apache2).
Unfortunately, I'm getting this error, when visiting the URL where I installed it:

https://imgur.com/a/hIgVw

In my apache2 error_log there are no errors logged, which gives me a hard time debugging. I did install all the requirements as described in the readme.md.

Download emails as .EML

Sometimes the HTML-Rendering is not correct in the app, so then I would like to open the message in thunderbird or outlook.

UI Idea: The user clicks a "download" button, a download-dialog appears.

This could partly solve #4.

Problem with fetching the JSON. (HTTP_ERROR). Status: 500 / SSL Problems

Hi, thank you very much for your source code, it is very simple to instal. i installed this code on my centos 7 server.

Everything is ok until i acessed the server, it saying "problem with fetching the JSON. (HTTP_ERROR). Status: 500"
Here the details :
Sorry, there was a problem.
There is a problem with fetching the JSON. (HTTP_ERROR). Status: 500
Make sure the backend works corrently using the developer tools of your web browser.
Can you show me what kind of mistake of it? and how to solve it.

if i am using a custom host email, etc domainku.com, how should i do with MX records etc?

Thanks.

Display a Specific Email Address

I want to know how can i make some page to display a specific email address.
Like if i open https://[email protected] it shows this email but can be changed,
I want to display exactly this email on a specific page without allowing to change email address.
I want this to provide Gmail email accounts. (specific address that exists only)
or
Like multi domain if its possible to display a specific domains several email addresses on page to select one from.

Remove unneeded @ from Domain

I would recommend to remove the @ from
<option value='$aDomain' $selected>@$aDomain</option>

because we use it already here:
<div class="input-group-text">@</div>

Check if email is HTML or TEXT

Don't know if it's possible to check (via the header) if a email is in HTML or Text format.

Then we can display HTML direct as HTML and Text direct as Text as default.

[Feature] Prefix (or suffix) for disposable mailboxes

This software looks very promising: simple and efficient.

However, I have one domain, and before buying a domain only for disposable addresses, I'd like to know if it is possible to use a prefix for disposable mailboxes. E.g., only mailboxes starting with onetime- or contact- (to be stealthy), to avoid messing with existing mailboxes.

Attachment Support

How do I view the message attachment, I'm trying to put this in my ticket system.

Thank you

Feature Request: RSS Feed

This project looks great, but I'd really love it if there was a feature to view an email address as an RSS feed.

[SUGGESTION] Download & Delete URL changes (use base64 to to pass ID and address)

I modified my Script so it use now the following URLs (for download & delete and later for reply too):

?download&email=aWQ9MTcxJmFkZHJlc3M9Z3VkaUBwb3N0ZmFjaDJnby5kZQ
?delete&email=aWQ9MTcxJmFkZHJlc3M9Z3VkaUBwb3N0ZmFjaDJnby5kZQ

the email= query is now base64 encoded and contains "id=XY&address=XY" which makes it a little more saver and the url looks a lot better ;-)

index.php change:

} elseif (isset($_GET['download']) && isset($_GET['email'])) {
    $email_info = base64url_decode($_GET['email']);
    $user = User::parseDomain(get_address_from_query_string($email_info));
    $email_id = get_id_from_query_string($email_info);
    if ($user->isInvalid() || !is_numeric($email_id)) {
        redirect_to_random($config['domains']);
        exit();
    }
    download_email($email_id, $user);
    exit();
} elseif (isset($_GET['delete']) && isset($_GET['email'])) {
    $email_info = base64url_decode($_GET['email']);
    $user = User::parseDomain(get_address_from_query_string($email_info));
    $email_id = get_id_from_query_string($email_info);
    if ($user->isInvalid() || !is_numeric($email_id)) {
        redirect_to_random($config['domains']);
        exit();
    }
    delete_email($email_id, $user);
    header("location: ?" . $user->address);
    exit();

and add on the bottom of index.php:

function base64url_encode($data) { 
    return rtrim(strtr(base64_encode($data), '+/', '-_'), '='); 
} 
function base64url_decode($data) { 
    return base64_decode(str_pad(strtr($data, '-_', '+/'), strlen($data) % 4, '=', STR_PAD_RIGHT)); 
} 
function get_address_from_query_string($data) { 
    parse_str($data);
    return $address; 
} 
function get_id_from_query_string($data) { 
    parse_str($data);
    return $id; 
} 

frontend.template.php change:

                                    <a class="btn btn-sm btn-outline-primary" download="true"
                                        role="button"
                                        href="?download&email=<?php echo base64url_encode('id='.$safe_email_id.'&address='.$user->address); ?>">Download
                                    </a>
                                    <a class="btn btn-sm btn-outline-danger"
                                        role="button"
                                        href="?delete&email=<?php echo base64url_encode('id='.$safe_email_id.'&address='.$user->address); ?>">Delete
                                    </a>

Live Example: http://www.postfach2go.de/[email protected]

make config accessable to the frontend

email domain and deletion period are not accessible from frontend. So the deletion period might be wrong in the frontend.

It should be as simple as possible.

Help configure IMAP settings

Hello.

Need a little help to configure IMAP settings.

I know which are my IMAP address, as I'm using a shared webhost provider.
I iknow credentials and so but I don't understand the IMAP settings in config.php

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.