How do I configure the default email sender properties on a debian server?

314

There's a /etc/email-addresses that associates outgoing email addresses with local user accounts (it's part of the default rewrite config of Debian's Exim). I think this is the better solution for your problem.

Also, during a dpkg-reconfigure exim4-config there's an option Hide local mail name in outgoing name, see if it can help you.

Share:
314

Related videos on Youtube

Vladislav Lezhnin
Author by

Vladislav Lezhnin

Updated on September 17, 2022

Comments

  • Vladislav Lezhnin
    Vladislav Lezhnin almost 2 years

    I applied ember-simple-auth-0.6.4.js in my ember-js application and there is one case, which is quite common. Here is the sequence of steps.

    1. User authenticates in the application (I use custom authenticator for that). So the session becomes valid.
    2. After ~20 minutes of inactivity backend session becomes invalid.
    3. User goes to a route (derived from AuthenticatedRouteMixin), and since ember session in client's app is still valid -> "session authenticated" check passes.
    4. Then the route model hook called, in which I try to load some data from backend using ajax request - and I get 401 unauthorized response, because backend session is invalid.
    5. After 401 error response client's app session is invalidated - then sessionInvalidationSucceeded() handler defined in application-route-mixin is called, where location changes: window.location.replace(Configuration.applicationRootUrl);

    The problem is: If url defined in applicationRootUrl - is under authenticated route - the login page will be shown to user, but after the authentication user goes to applicationRootUrl again, but not to the page where ajax error originally happened.

    My solution to this:

    • In AuthenticatedRouteMixin beforeModel() hook I store last transition:

      Configuration.beforeInvalidationTransition = transition;

    • In ApplicationRouteMixin I redefine sessionInvalidatedSucceeded hook:

      sessionInvalidationSucceeded: function() { if (Configuration.beforeInvalidationTransition) { this.get(Configuration.sessionPropertyName) .set('attemptedTransition',Configuration.beforeInvalidationTransition); } this.transitionTo(Configuration.authenticationRoute);

    So if 401 error occurred, user is redirected to login page (Configuration.authenticationRoute) and route in which the error occurred - is stored to attemptedTransition, so after successful login the user will be redirected to the place where he stopped working.

    Does it make sense or there is more elegant solution for this problem?

  • Kzqai
    Kzqai about 13 years
    Using /etc/email-addresses definitely ended up solving my problem, gracias.
  • Vladislav Lezhnin
    Vladislav Lezhnin almost 10 years
    Thanks for your reply! And shouldn't be this logic of saving the last transition in the session a part of the authenticated-route-mixin? I would like to know the last transition to the authenticated route in order to retry it after the successful login.
  • marcoow
    marcoow almost 10 years
    That functionality is actually part of the library but not for the case where the session is expired. It would also be hard to detect the case where the session is expired as e.g. a 401 might have a different reason e.g. the user trying to do sth. they're not allowed to.